8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations

Reviewed-by: rriggs
This commit is contained in:
Per Minborg 2024-04-05 07:38:43 +00:00
parent 1131bb77ec
commit b71acc704a
2 changed files with 9 additions and 0 deletions

View file

@ -258,6 +258,8 @@ class ImmutableCollections {
@Override public void add(int index, E element) { throw uoe(); }
@Override public boolean addAll(int index, Collection<? extends E> c) { throw uoe(); }
@Override public E remove(int index) { throw uoe(); }
@Override public E removeFirst() { throw uoe(); }
@Override public E removeLast() { throw uoe(); }
@Override public void replaceAll(UnaryOperator<E> operator) { throw uoe(); }
@Override public E set(int index, E element) { throw uoe(); }
@Override public void sort(Comparator<? super E> c) { throw uoe(); }