src/java.base/share/classes/java/net/ServerSocket.java
branchniosocketimpl-branch
changeset 57172 63ab5af5d009
parent 57171 d8ed7335dadd
child 57173 6692e71a4e9f
--- a/src/java.base/share/classes/java/net/ServerSocket.java	Sat Feb 09 19:16:30 2019 +0000
+++ b/src/java.base/share/classes/java/net/ServerSocket.java	Sun Feb 10 09:54:31 2019 +0000
@@ -553,7 +553,7 @@
             impl.accept(si);
             try {
                 // a custom impl has accepted the connection with a NIO SocketImpl
-                if ((si instanceof NioSocketImpl) && !(impl instanceof NioSocketImpl)) {
+                if (!(impl instanceof NioSocketImpl) && (si instanceof NioSocketImpl)) {
                     ((NioSocketImpl) si).postCustomAccept();
                 }
             } finally {
@@ -566,8 +566,8 @@
             return;
         }
 
-        if (si instanceof SocketImpl.DelegatingImpl)
-            si = ((SocketImpl.DelegatingImpl) si).delegate();
+        if (si instanceof DelegatingSocketImpl)
+            si = ((DelegatingSocketImpl) si).delegate();
 
         // ServerSocket or Socket is using NIO SocketImpl
         if (impl instanceof NioSocketImpl || si instanceof NioSocketImpl) {