mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix generic collection toString (#559)
This commit is contained in:
parent
d1606ea2a5
commit
6ef841a560
|
@ -146,11 +146,11 @@ public abstract class TAbstractCollection<E> extends TObject implements TCollect
|
||||||
TIterator<E> iter = iterator();
|
TIterator<E> iter = iterator();
|
||||||
if (iter.hasNext()) {
|
if (iter.hasNext()) {
|
||||||
E e = iter.next();
|
E e = iter.next();
|
||||||
sb.append(e == this ? "(this Collection)" : iter.next());
|
sb.append(e == this ? "(this Collection)" : e);
|
||||||
}
|
}
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
E e = iter.next();
|
E e = iter.next();
|
||||||
sb.append(", ").append(e == this ? "(this Collection)" : iter.next());
|
sb.append(", ").append(e == this ? "(this Collection)" : e);
|
||||||
}
|
}
|
||||||
sb.append(']');
|
sb.append(']');
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user