Fix generic collection toString (#559)

This commit is contained in:
Ivan Hetman 2021-03-06 18:28:06 +02:00 committed by GitHub
parent d1606ea2a5
commit 6ef841a560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,11 +146,11 @@ public abstract class TAbstractCollection<E> extends TObject implements TCollect
TIterator<E> iter = iterator();
if (iter.hasNext()) {
E e = iter.next();
sb.append(e == this ? "(this Collection)" : iter.next());
sb.append(e == this ? "(this Collection)" : e);
}
while (iter.hasNext()) {
E e = iter.next();
sb.append(", ").append(e == this ? "(this Collection)" : iter.next());
sb.append(", ").append(e == this ? "(this Collection)" : e);
}
sb.append(']');
return sb.toString();