<i18n dev> RFR: 8356843: Avoid redundant HashMap.get to obtain old value in Toolkit.setDesktopProperty

Andrey Turbanov aturbanov at openjdk.org
Tue May 13 08:15:32 UTC 2025


To obtain previous value of `HashMap` we can use result of `.put` call. In this case we can avoid redundant `.get` call.

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

Commit messages:
 - [PATCH] Avoid redundant WeakHashMap.get to obtain old value in Toolkit

Changes: https://git.openjdk.org/jdk/pull/24691/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24691&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8356843
  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24691.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24691/head:pull/24691

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


More information about the i18n-dev mailing list