equal
deleted
inserted
replaced
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 */ |