[lworld] RFR: 8373701: [lworld] Revert Use Objects.equals in HashMap and ConcurrentHashmap
Chen Liang
liach at openjdk.org
Tue Dec 16 15:19:30 UTC 2025
On Mon, 15 Dec 2025 19:14:20 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Revert the use of Objects.equals to the previous explicit `==` check for identity and conditional call to .equals. The use of Objects.equals (without identity) caused classes with poorly written .equals methods to work incorrectly with HashMap and ConcurrentHashMap.
>
> This reverts commit c8d4a247861052aa6ed43125bcbe49995326938f.
As discussed with John Rose and others. I guess the goal is to represent == as some sort of C2 macro node, so if an `equals` invocation` tests `==` it can be coalesced with the caller ==.
-------------
Marked as reviewed by liach (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1800#pullrequestreview-3583422475
More information about the valhalla-dev
mailing list