<i18n dev> RFR: 8287181: Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder.setExtension

Andrey Turbanov aturbanov at openjdk.java.net
Mon May 23 20:51:16 UTC 2022


No need to separately perform `HashMap.containsKey` before `HashMap.remove` call. If key is present - it will be removed anyway. If it's not present, nothing will be deleted.

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

Commit messages:
 - [PATCH] Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder

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

PR: https://git.openjdk.java.net/jdk/pull/8488


More information about the i18n-dev mailing list