mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8161558: ListIterator should not discard cause on exception
Reviewed-by: smarks
This commit is contained in:
parent
cd7d175001
commit
fa069be2f2
3 changed files with 143 additions and 2 deletions
|
@ -374,7 +374,7 @@ public abstract class AbstractList<E> extends AbstractCollection<E> implements L
|
|||
return next;
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
checkForComodification();
|
||||
throw new NoSuchElementException();
|
||||
throw new NoSuchElementException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -418,7 +418,7 @@ public abstract class AbstractList<E> extends AbstractCollection<E> implements L
|
|||
return previous;
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
checkForComodification();
|
||||
throw new NoSuchElementException();
|
||||
throw new NoSuchElementException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue