RFR: JDK-8285504 Minor cleanup could be done in javax.net [v4]

Bradford Wetmore wetmore at openjdk.java.net
Thu Apr 28 16:30:46 UTC 2022


On Thu, 28 Apr 2022 16:22:43 GMT, Bradford Wetmore <wetmore at openjdk.org> wrote:

>> src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java line 92:
>> 
>>> 90:     static String getSecurityProperty(final String name) {
>>> 91:         return AccessController.doPrivileged((PrivilegedAction<String>) () -> {
>>> 92:             return Security.getProperty(name);
>> 
>> I assume we still need to do the if-empty-then-null conversion?
>
> Just found the same.  This needs to be reverted.  You can set a Security Property to an "empty" string which won't work here.  Suggest you revert to previous code, possibly using a lambda if that was the original intent.

`Security.getProperty()` does not specify the value will be `trim()`.

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

PR: https://git.openjdk.java.net/jdk/pull/8384


More information about the security-dev mailing list