RFR: 6323374: (coll) Optimize Collections.unmodifiable* and synchronized* [v4]
Claes Redestad
redestad at openjdk.java.net
Tue Feb 23 16:21:41 UTC 2021
On Tue, 23 Feb 2021 06:12:54 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Is there any behavior change here that merits a CSR review?
Maybe. The one observable change is that calling `Collections.bar(foo)` with a `foo` that is already a `bar` will return the instance rather than unnecessarily wrap it. This could change semantics in applications inadvertently or deliberately relying on identity.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2596
More information about the core-libs-dev
mailing list