[lworld] RFR: 8366214: [lworld] Use Objects.equals in HashMap and ConcurrentHashmap

Roger Riggs rriggs at openjdk.org
Fri Aug 29 03:23:54 UTC 2025


On Thu, 28 Aug 2025 13:38:54 GMT, Chen Liang <liach at openjdk.org> wrote:

>> HashMap allows null keys and that is handled separately in each case, not by the `equals` method.
>> "supposed to" is not sufficient when compatibility is concerned.
>
> I think your current logic differs when `e.key == null` and `k == null` - previously it evaluates to true, now this test fails.

True, but to get here `k != null`. (line 678)

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1536#discussion_r2309028558


More information about the valhalla-dev mailing list