RFR: 8289658: Avoid redundant LinkedHashMap.get call in TagletManager.addNewSimpleCustomTag

Andrey Turbanov aturbanov at openjdk.org
Mon Jul 4 07:15:36 UTC 2022


Instead of pair `LinkedHashMap.get`+`LinkedHashMap.remove` calls, we can use value returned from single `allTaglets.remove` call.
It's shorter and a bit faster.
https://github.com/openjdk/jdk/blob/d46f404b3179c66e8e5775a9e2253c95238153c7/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java#L314-L325

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

Commit messages:
 - [PATCH] Avoid redundant LinkedHashMap.get call in TagletManager.addNewSimpleCustomTag

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

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


More information about the javadoc-dev mailing list