Hashtable doesn't allow `null` values. So, instead of pair 
`containsKey`/`remove` calls, we can directly call `remove` and then compare 
result with `null`.
https://github.com/openjdk/jdk/blob/2c461acfebd28fe5ef62805cbb004f91a3b18f08/src/java.base/share/classes/java/util/jar/JarVerifier.java#L433-L436

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

Commit messages:
 - [PATCH] Avoid redundant Hashtable.containsKey call in JarVerifier

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

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

Reply via email to