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