On Thu, 27 Nov 2025 14:14:10 GMT, Liam Miller-Cushon <[email protected]> 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 with a new target base due to 
> a merge or a rebase. The pull request now contains 20 commits:
> 
>  - Merge branch 'master' into JDK-8328821-make-clear-consistent
>  - Merge commit 'f94644999766e752f7d60ce52c14a7db79005035' into 
> JDK-8328821-make-clear-consistent
>  - Merge commit 'f94644999766e752f7d60ce52c14a7db79005035^' into 
> JDK-8328821-make-clear-consistent
>  - Add an implementation comment to AbstractImmutableMap
>  - Update for Stable Values
>  - Merge remote-tracking branch 'origin/master' into 
> JDK-8328821-make-clear-consistent
>  - Merge remote-tracking branch 'origin/master' into 
> JDK-8328821-make-clear-consistent
>  - Merge remote-tracking branch 'origin/master' into 
> JDK-8328821-make-clear-consistent
>  - Merge remote-tracking branch 'origin/master' into 
> JDK-8328821-make-clear-consistent
>  - Update test/jdk/java/util/Collection/MOAT.java
>    
>    Co-authored-by: Chen Liang <[email protected]>
>  - ... and 10 more: https://git.openjdk.org/jdk/compare/86aae125...f113d6ab

src/java.base/share/classes/java/util/ImmutableCollections.java line 1189:

> 1187:         @Override
> 1188:         public Collection<V> values() {
> 1189:             return List.of(v0);

Maybe return a subclass of `AbstractImmutableCollection` instead?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18522#discussion_r3792897136

Reply via email to