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

Ian Graves igraves at openjdk.java.net
Wed Feb 17 20:20:40 UTC 2021


On Wed, 17 Feb 2021 14:14:57 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> No? This unmodifiable set here just delegates call to the backing field `c`, so all exceptions from `c`'s calls are just delegated, aren't they? The NPE will still be thrown; it's just that the stack trace will be different (i.e. one more level of call in the stacktrace)
>
> Yes, my bad. There might be more issues similar to the one @michaelhixson points out elsewhere in this PR, so a thorough review is probably needed here.

Resolving these for now. Going to punt these inconsistencies to another bug before bringing this back in. This change will focus on the idempotency of these methods vs. the classes contained in `Collections`.

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

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


More information about the core-libs-dev mailing list