Fix infinite loop
This commit is contained in:
parent
cbdf37800a
commit
2c933529f1
@ -41,13 +41,11 @@ public class IteratorIterator<T> implements Iterator<T> {
|
||||
}
|
||||
private void fixState() {
|
||||
fixCurrentIterator();
|
||||
while (currentIterator == null) {
|
||||
if (iterators.hasNext()) {
|
||||
while (currentIterator == null && iterators.hasNext()) {
|
||||
currentIterator = iterators.next();
|
||||
fixCurrentIterator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
|
Loading…
Reference in New Issue
Block a user