RFR: 8324646: Avoid Class.forName in SecureRandom constructor [v2]
Roger Riggs
rriggs at openjdk.org
Wed Jan 24 20:13:26 UTC 2024
On Wed, 24 Jan 2024 17:57:38 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:
>> src/java.base/share/classes/java/security/Provider.java line 1560:
>>
>>> 1558: final boolean supportsParameter;
>>> 1559: final String constructorParameterClassName;
>>> 1560: private volatile Class<?> constructorParameterClass;
>>
>> Style: no need for `private` here, match what other fields are doing.
>
> I don't disagree in principle but it was like this before the revert, and is still like this in 17.
Is volatile really needed? And there is some performance penalty and in practice the value will be the same even if recomputed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17559#discussion_r1465483019
More information about the security-dev
mailing list