RFR: 8372256 : ClassCastException in `ConcurrentHashMap#equals`
Alan Bateman
alanb at openjdk.org
Fri Nov 21 17:58:50 UTC 2025
On Fri, 21 Nov 2025 14:37:57 GMT, Viktor Klang <vklang at openjdk.org> wrote:
> Adding logic to handle CCEs and NPEs (the latter cannot logically occur as CHM does not support null keys) as per [AbstractMap::equals](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/AbstractMap.java#L474)
Okay although another random usage of get(Object) with an key for the wrong type will also fail with CCE.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28453#pullrequestreview-3493819494
More information about the core-libs-dev
mailing list