--- old/src/java.base/share/classes/sun/nio/ch/Net.java 2018-05-03 16:52:24.718492753 -0700 +++ new/src/java.base/share/classes/sun/nio/ch/Net.java 2018-05-03 16:52:24.488492768 -0700 @@ -54,7 +54,7 @@ public class Net { - private Net() { } + protected Net() { } // unspecified protocol family static final ProtocolFamily UNSPEC = new ProtocolFamily() { @@ -79,7 +79,7 @@ /** * Tells whether dual-IPv4/IPv6 sockets should be used. */ - static boolean isIPv6Available() { + protected static boolean isIPv6Available() { if (!checkedIPv6) { isIPv6Available = isIPv6Available0(); checkedIPv6 = true; @@ -196,7 +196,7 @@ translateToSocketException(x); } - static void translateException(Exception x) + public static void translateException(Exception x) throws IOException { translateException(x, false); @@ -205,7 +205,7 @@ /** * Returns the local address after performing a SecurityManager#checkConnect. */ - static InetSocketAddress getRevealedLocalAddress(InetSocketAddress addr) { + public static InetSocketAddress getRevealedLocalAddress(InetSocketAddress addr) { SecurityManager sm = System.getSecurityManager(); if (addr == null || sm == null) return addr; @@ -220,7 +220,7 @@ return addr; } - static String getRevealedLocalAddressAsString(InetSocketAddress addr) { + public static String getRevealedLocalAddressAsString(InetSocketAddress addr) { return System.getSecurityManager() == null ? addr.toString() : getLoopbackAddress(addr.getPort()).toString(); }