--- a/src/java.base/share/classes/java/net/SocketImpl.java Mon Feb 11 15:17:31 2019 +0000
+++ b/src/java.base/share/classes/java/net/SocketImpl.java Mon Feb 11 19:16:13 2019 +0000
@@ -35,7 +35,6 @@
import sun.net.NetProperties;
import sun.nio.ch.NioSocketImpl;
-import sun.security.action.GetPropertyAction;
/**
* The abstract class {@code SocketImpl} is a common superclass
@@ -52,9 +51,9 @@
private static final boolean USE_PLAINSOCKETIMPL = usePlainSocketImpl();
private static boolean usePlainSocketImpl() {
- PrivilegedAction<Boolean> pa = () -> NetProperties.getBoolean("jdk.net.usePlainSocketImpl");
- Boolean val = AccessController.doPrivileged(pa);
- return val == null ? false : val;
+ PrivilegedAction<String> pa = () -> NetProperties.get("jdk.net.usePlainSocketImpl");
+ String s = AccessController.doPrivileged(pa);
+ return (s != null) && !s.equalsIgnoreCase("false");
}
/**