RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]
Sean Mullan
mullan at openjdk.org
Tue Sep 6 21:19:09 UTC 2022
On Fri, 2 Sep 2022 18:48:32 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
some more comments ... mostly minor stuff.
src/java.base/share/classes/sun/security/provider/certpath/BuildStep.java line 245:
> 243: out = out + vertex.moreToString();
> 244: break;
> 245: default:
align this with the "case" statements.
src/java.base/share/classes/sun/security/provider/certpath/Builder.java line 62:
> 60: /**
> 61: * Flag indicating whether support for the caIssuers field of the
> 62: * Authority Information Access extension shall be enabled. Currently,
I think it reads better w/o the comma.
src/java.base/share/classes/sun/security/provider/certpath/CertId.java line 226:
> 224: "\nissuerKeyHash: \n" +
> 225: encoder.encode(issuerKeyHash) +
> 226: "\n" + certSerialNumber.toString();
I believe this creates more `String` objects whereas the previous code used a mutable `StringBuilder` to build up the `String` first. Not sure this code is better, even though this is probably not a commonly called method.
src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java line 337:
> 335: if (pointCrlIssuers != null) {
> 336: if (idpExt == null ||
> 337: idpExt.get (IssuingDistributionPointExtension.INDIRECT_CRL)
Nit, remove space after `get`.
src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java line 338:
> 336: if (idpExt == null ||
> 337: idpExt.get (IssuingDistributionPointExtension.INDIRECT_CRL)
> 338: == (Boolean.FALSE)) {
Don't need the parens around `Boolean.FALSE` now.
-------------
PR: https://git.openjdk.org/jdk/pull/9972
More information about the security-dev
mailing list