< prev index next >
src/java.base/share/classes/java/util/AbstractList.java
Print this page
*** 372,382 ****
lastRet = i;
cursor = i + 1;
return next;
} catch (IndexOutOfBoundsException e) {
checkForComodification();
! throw new NoSuchElementException();
}
}
public void remove() {
if (lastRet < 0)
--- 372,382 ----
lastRet = i;
cursor = i + 1;
return next;
} catch (IndexOutOfBoundsException e) {
checkForComodification();
! throw new NoSuchElementException(e);
}
}
public void remove() {
if (lastRet < 0)
*** 416,426 ****
E previous = get(i);
lastRet = cursor = i;
return previous;
} catch (IndexOutOfBoundsException e) {
checkForComodification();
! throw new NoSuchElementException();
}
}
public int nextIndex() {
return cursor;
--- 416,426 ----
E previous = get(i);
lastRet = cursor = i;
return previous;
} catch (IndexOutOfBoundsException e) {
checkForComodification();
! throw new NoSuchElementException(e);
}
}
public int nextIndex() {
return cursor;
< prev index next >