RFR: 8288067: Avoid redundant HashMap.containsKey call in Type1Font.expandAbbreviation

Andrey Turbanov aturbanov at openjdk.java.net
Wed Jun 8 21:11:14 UTC 2022


Instead of pair HashMap.containsKey/HashMap.get method calls, we can use single call HashMap.getOrDefault.
It's faster and clearer.

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

Commit messages:
 - [PATCH] Avoid redundant HashMap.containsKey call in Type1Font.expandAbbreviation

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

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



More information about the client-libs-dev mailing list