RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]
Sean Mullan
mullan at openjdk.org
Tue Aug 30 20:01:10 UTC 2022
On Mon, 29 Aug 2022 21:48:18 GMT, Mark Powers <mpowers at openjdk.org> wrote:
>> https://bugs.openjdk.org/browse/JDK-8291509
>
> Mark Powers has updated the pull request incrementally with one additional commit since the last revision:
>
> white space
A few more comments.
src/java.base/share/classes/sun/security/pkcs/SigningCertificateInfo.java line 133:
> 131: private final byte[] certHash;
> 132: private GeneralNames issuer;
> 133: private SerialNumber serialNumber;
You could also mark these as `final` and add an `else` block to the ctor which sets them to `null`.
src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java line 2319:
> 2317: } else {
> 2318: // Different keyId. Not a fallback.
> 2319: continue;
Personally I prefer seeing "continue" here - it makes it clear that none of the remaining code in this loop is relevant.
-------------
PR: https://git.openjdk.org/jdk/pull/9972
More information about the security-dev
mailing list