On Thu, 24 Apr 2025 20:18:01 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

> Instead of separate `.get(Key)`+`.remove(Key)` calls we can call 
> `.remove(Key, Value)`.
> `peerMap` is an `IdentityHashMap`. IdentityHashMap.remove compares values 
> with == since Java 20 
> ([JDK-8178355](https://bugs.openjdk.org/browse/JDK-8178355))

Looks fine.

The code now depends on the fact that `peerMap` is an `IdentityHashMap` which 
may be not such a good thing.

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

Marked as reviewed by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24858#pullrequestreview-2932501820

Reply via email to