RFR: 8343194: Avoid redundant Hashtable.containsKey call in CodeSource.readObject
Andrey Turbanov
aturbanov at openjdk.org
Tue Oct 29 11:35:14 UTC 2024
`Hashtable` doesn't allow `null` values.
It means we can replace containsKey+get with get+null check.
It's clearer and a bit faster.
-------------
Commit messages:
- [PATCH] Avoid redundant Hashtable.containsKey call in CodeSource.readObject
Changes: https://git.openjdk.org/jdk/pull/21753/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21753&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8343194
Stats: 6 lines in 1 file changed: 0 ins; 3 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/21753.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21753/head:pull/21753
PR: https://git.openjdk.org/jdk/pull/21753
More information about the security-dev
mailing list