Re: RFR: 8287696: Avoid redundant Hashtable.containsKey call in JarVerifier.doneWithMeta
On Sat, 28 May 2022 12:00:00 GMT, Andrey Turbanov wrote: > 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 Thank you for review! - PR: https://git.openjdk.org/jdk/pull/8935
Re: RFR: 8287696: Avoid redundant Hashtable.containsKey call in JarVerifier.doneWithMeta
On Sat, 28 May 2022 12:00:00 GMT, Andrey Turbanov wrote: > 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 The changes to doneWithMeta() seem reasonable and the other changes remove unused code so look OK to me - Marked as reviewed by lancea (Reviewer). PR: https://git.openjdk.org/jdk/pull/8935
Re: RFR: 8287696: Avoid redundant Hashtable.containsKey call in JarVerifier.doneWithMeta
On Sat, 28 May 2022 12:00:00 GMT, Andrey Turbanov wrote: > 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 Looks fine to me. Please wait for another review before merging. - Marked as reviewed by jpai (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8935
RFR: 8287696: Avoid redundant Hashtable.containsKey call in JarVerifier.doneWithMeta
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=8935=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