RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v3]

liach github.com+7806504+liach at openjdk.java.net
Sat Feb 20 16:50:39 UTC 2021


On Wed, 17 Feb 2021 19:56:01 GMT, Ian Graves <igraves at openjdk.org> wrote:

>> Modify the `unmodifiable*` methods in `java.util.Collections` to be idempotent. That is, when given an immutable collection from `java.util.ImmutableCollections` or `java.util.Collections`, these methods will return the reference instead of creating a new immutable collection that wraps the existing one.
>
> Ian Graves has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removing ImmutableCollections.* idempotency

In addition year for license of Collections.java needs an update too

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

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


More information about the core-libs-dev mailing list