RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)
Stuart Marks
smarks at openjdk.java.net
Thu Apr 21 00:51:27 UTC 2022
On Fri, 15 Apr 2022 05:58:32 GMT, liach <duke at openjdk.java.net> wrote:
> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare values by identity. Updated API documentation of these two methods ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.lang.Object,java.lang.Object))) to mention such behavior.
Thanks for working on this. Yes I can review and sponsor this change.
Sorry I got a bit distracted. I started looking at the test here, and this lead me to inquire about what other tests we have for `IdentityHashMap`, and the answer is: not enough. See [JDK-8285295](https://bugs.openjdk.java.net/browse/JDK-8285295). (But that should be handled separately.)
-------------
PR: https://git.openjdk.java.net/jdk/pull/8259
More information about the core-libs-dev
mailing list