RFR: 8344024: Unnecessary Hashtable usage in RSAPSSSignature.DIGEST_LENGTHS

Valerie Peng valeriep at openjdk.org
Wed Nov 13 19:44:48 UTC 2024


On Fri, 1 Nov 2024 12:15:36 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> 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.

Look good to me. Thanks for the improvement~

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

Marked as reviewed by valeriep (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21823#pullrequestreview-2434255433


More information about the security-dev mailing list