RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

liach duke at openjdk.java.net
Fri Apr 15 06:07:11 UTC 2022


Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare values by identity. Updated API documentation of these two methods to mention such behavior.

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

Commit messages:
 - Fix indent
 - 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

Changes: https://git.openjdk.java.net/jdk/pull/8259/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8259&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8178355
  Stats: 165 lines in 2 files changed: 132 ins; 32 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8259.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8259/head:pull/8259

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


More information about the core-libs-dev mailing list