diff -r 7eb6cdd1204a -r 726630bc6a4c src/java.base/share/classes/java/net/ServerSocket.java --- a/src/java.base/share/classes/java/net/ServerSocket.java Mon Feb 11 08:39:50 2019 +0000 +++ b/src/java.base/share/classes/java/net/ServerSocket.java Mon Feb 11 15:17:31 2019 +0000 @@ -38,8 +38,7 @@ import java.util.Set; import java.util.Collections; -import sun.net.TrustedSocketImpl; -import sun.nio.ch.NioSocketImpl; +import sun.net.PlatformSocketImpl; /** * This class implements server sockets. A server socket waits for @@ -553,8 +552,8 @@ impl.accept(si); try { // a custom impl has accepted the connection with a trusted SocketImpl - if (!(impl instanceof TrustedSocketImpl) && (si instanceof TrustedSocketImpl)) { - ((TrustedSocketImpl) si).postCustomAccept(); + if (!(impl instanceof PlatformSocketImpl) && (si instanceof PlatformSocketImpl)) { + ((PlatformSocketImpl) si).postCustomAccept(); } } finally { securityCheckAccept(si); // closes si if permission check fails @@ -569,19 +568,19 @@ // Socket has a SOCKS or HTTP SocketImpl if (si instanceof DelegatingSocketImpl) { si = ((DelegatingSocketImpl) si).delegate(); - assert si instanceof TrustedSocketImpl; + assert si instanceof PlatformSocketImpl; } // ServerSocket or Socket is using a trusted SocketImpl - if (impl instanceof TrustedSocketImpl || si instanceof TrustedSocketImpl) { + if (impl instanceof PlatformSocketImpl || si instanceof PlatformSocketImpl) { // accept connection with new SocketImpl - var nsi = (impl instanceof TrustedSocketImpl) - ? ((TrustedSocketImpl) impl).newInstance(false) - : ((TrustedSocketImpl) si).newInstance(false); + var nsi = (impl instanceof PlatformSocketImpl) + ? ((PlatformSocketImpl) impl).newInstance(false) + : ((PlatformSocketImpl) si).newInstance(false); impl.accept(nsi); try { // a custom impl has accepted the connection with a trusted SocketImpl - if (!(impl instanceof TrustedSocketImpl)) { + if (!(impl instanceof PlatformSocketImpl)) { nsi.postCustomAccept(); } } finally {