src/java.base/share/classes/java/net/SocketImpl.java
branchniosocketimpl-branch
changeset 57176 726630bc6a4c
parent 57174 899641440751
child 57177 0b5ebb227a8d
equal deleted inserted replaced
57175:7eb6cdd1204a 57176:726630bc6a4c
    50  */
    50  */
    51 public abstract class SocketImpl implements SocketOptions {
    51 public abstract class SocketImpl implements SocketOptions {
    52     private static final boolean USE_PLAINSOCKETIMPL = usePlainSocketImpl();
    52     private static final boolean USE_PLAINSOCKETIMPL = usePlainSocketImpl();
    53 
    53 
    54     private static boolean usePlainSocketImpl() {
    54     private static boolean usePlainSocketImpl() {
    55         String s = GetPropertyAction.privilegedGetProperty("jdk.net.usePlainSocketImpl");
    55         PrivilegedAction<Boolean> pa = () -> NetProperties.getBoolean("jdk.net.usePlainSocketImpl");
    56         if (s != null && !"false".equalsIgnoreCase(s))
    56         Boolean val = AccessController.doPrivileged(pa);
    57             return true;
    57         return val == null ? false : val;
    58 
       
    59         PrivilegedAction<String> pa = () -> NetProperties.get("jdk.net.socketimpl.default");
       
    60         s = AccessController.doPrivileged(pa);
       
    61         return (s != null) && "classic".equalsIgnoreCase(s);
       
    62     }
    58     }
    63 
    59 
    64     /**
    60     /**
    65      * Creates a instance of platform's SocketImpl
    61      * Creates a instance of platform's SocketImpl
    66      */
    62      */