Integrated: 8357686: Remove unnecessary Map.get from AWTAutoShutdown.unregisterPeer

Andrey Turbanov aturbanov at openjdk.org
Wed Jun 18 21:01:33 UTC 2025


On Thu, 24 Apr 2025 20:18:01 GMT, Andrey Turbanov <aturbanov at 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))

This pull request has now been integrated.

Changeset: 5a62e995
Author:    Andrey Turbanov <aturbanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5a62e99523904e89caf561d4c1068c1565a97450
Stats:     3 lines in 1 file changed: 0 ins; 1 del; 2 mod

8357686: Remove unnecessary Map.get from AWTAutoShutdown.unregisterPeer

Reviewed-by: serb, aivanov

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

PR: https://git.openjdk.org/jdk/pull/24858


More information about the client-libs-dev mailing list