RFR: JDK-8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations
Roger Riggs
rriggs at openjdk.org
Wed Apr 3 15:12:09 UTC 2024
On Tue, 2 Apr 2024 10:37:02 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> This PR proposes to make empty immutable lists always throw UOE on `removeFirst` and `removeLast`.
test/jdk/java/util/Collection/MOAT.java line 573:
> 571: c::removeLast);
> 572: }
> 573:
Would this test better if inserted in `testImmutableCollection(final Collection<T> c, T t)`, Line 477'ish.
Or in `testImmutableList(final List<Integer> c)`, line 519.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18581#discussion_r1549940454
More information about the core-libs-dev
mailing list