RFR: 8272042: java.util.ImmutableCollections$Map1 and MapN should not be @ValueBased [v2]

Roger Riggs rriggs at openjdk.java.net
Mon Nov 22 20:24:06 UTC 2021


On Sun, 21 Nov 2021 11:15:53 GMT, Jens Li <duke at openjdk.java.net> wrote:

> Should this change also update the Javadoc on `java.util.Map` and remove the statement that the return values of `Map#of` are value-based?
> 

This PR is only correcting the application of the internal use annotation to some implementation classes.
The descriptions of unmodifiable maps identify the conditions the clients of Map.of may and may not assume about the returned instances including those related to identity.

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

PR: https://git.openjdk.java.net/jdk/pull/6480


More information about the core-libs-dev mailing list