RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]
Sean Mullan
mullan at openjdk.org
Tue Sep 6 17:09:54 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
reviewed up to certpath dir.
src/java.base/share/classes/sun/security/provider/AbstractDrbg.java line 81:
> 79: * does <em>not</em> need to compare it to {@link #reseedInterval}.
> 80: *
> 81: * Volatile, will be used in a double-checked locking.
Also, remove "a" as it reads more correctly w/o it.
src/java.base/share/classes/sun/security/provider/ConfigFile.java line 167:
> 165: // call in a doPrivileged
> 166: //
> 167: // we have already passed the Configuration.getInstance
s/we/We/
src/java.base/share/classes/sun/security/provider/ConfigFile.java line 168:
> 166: //
> 167: // we have already passed the Configuration.getInstance
> 168: // security check. also, this class is not freely accessible
s/also/Also/
src/java.base/share/classes/sun/security/provider/PolicyParser.java line 1165:
> 1163: }
> 1164:
> 1165: // everything matched -- the 2 objects are equal
remove the comment as it no longer applies
src/java.base/share/classes/sun/security/provider/PolicyParser.java line 1180:
> 1178: // and then in a java string, it's escaped again
> 1179:
> 1180: out.print(name.replaceAll("\\\\", "\\\\\\\\").replaceAll("\"", "\\\\\\\""));
Why does IJ say this is the same? This appears to replace backslash-quote with quote.
src/java.base/share/classes/sun/security/provider/SunEntries.java line 369:
> 367: * Use a URI to access this File. Previous code used a URL
> 368: * which is less strict on syntax. If we encounter a
> 369: * URISyntaxException we make the best efforts for backwards
I'd change this to "a best effort". Same comment on l392.
-------------
PR: https://git.openjdk.org/jdk/pull/9972
More information about the security-dev
mailing list