RFR: 8344024: Unnecessary Hashtable usage in RSAPSSSignature.DIGEST_LENGTHS

Andrey Turbanov aturbanov at openjdk.org
Tue Nov 12 11:39:04 UTC 2024


The field `sun.security.rsa.RSAPSSSignature#DIGEST_LENGTHS` is modified only in `<clinit>`. It means we can use Immutable Map instead of Hashtable.
Hashtable is legacy synchronized class, which have `synchronized` on its `get` method. It's not needed in our case.

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

Commit messages:
 - [PATCH] Unnecessary Hashtable usage in RSAPSSSignature.DIGEST_LENGTHS

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

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


More information about the security-dev mailing list