RFR: 8328821: Map.of() derived view collection mutators should throw UnsupportedOperationException [v6]
Chen Liang
liach at openjdk.org
Tue Jul 9 23:17:47 UTC 2024
On Tue, 9 Jul 2024 22:49:30 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> This change overrides mutator methods in the implementation returned by `Map.of().entrySet()` to throw `UnsupportedOperationException`.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>
> Update copyright year
>
> and add the bug number to the modified test
Marked as reviewed by liach (Committer).
test/jdk/java/util/Collection/MOAT.java line 541:
> 539: */
> 540: private static void testCollMutatorsAlwaysThrow(Collection<Integer> c) {
> 541: testCollMutatorsAlwaysThrow(c, ABSENT_VALUE);
Suggestion:
testCollMutatorsAlwaysThrow(c, ABSENT_VALUE);
-------------
PR Review: https://git.openjdk.org/jdk/pull/18522#pullrequestreview-2167636479
PR Review Comment: https://git.openjdk.org/jdk/pull/18522#discussion_r1671325840
More information about the core-libs-dev
mailing list