jdk/src/windows/classes/java/net/PlainSocketImpl.java
changeset 20501 058de8b0a499
parent 18192 fa6bd0992104
child 23010 6dadb192ad81
equal deleted inserted replaced
20500:44c2cb8a99bb 20501:058de8b0a499
   189     {
   189     {
   190         impl.bind(address, lport);
   190         impl.bind(address, lport);
   191     }
   191     }
   192 
   192 
   193     protected synchronized void accept(SocketImpl s) throws IOException {
   193     protected synchronized void accept(SocketImpl s) throws IOException {
   194         // pass in the real impl not the wrapper.
   194         if (s instanceof PlainSocketImpl) {
   195         SocketImpl delegate = ((PlainSocketImpl)s).impl;
   195             // pass in the real impl not the wrapper.
   196         delegate.address = new InetAddress();
   196             SocketImpl delegate = ((PlainSocketImpl)s).impl;
   197         delegate.fd = new FileDescriptor();
   197             delegate.address = new InetAddress();
   198         impl.accept(delegate);
   198             delegate.fd = new FileDescriptor();
   199 
   199             impl.accept(delegate);
   200         // set fd to delegate's fd to be compatible with older releases
   200             // set fd to delegate's fd to be compatible with older releases
   201         s.fd = delegate.fd;
   201             s.fd = delegate.fd;
       
   202         } else {
       
   203             impl.accept(s);
       
   204         }
   202     }
   205     }
   203 
   206 
   204     void setFileDescriptor(FileDescriptor fd) {
   207     void setFileDescriptor(FileDescriptor fd) {
   205         impl.setFileDescriptor(fd);
   208         impl.setFileDescriptor(fd);
   206     }
   209     }