src/java.base/share/classes/sun/nio/ch/UnixDomainSocketChannelImpl.java
branchunixdomainchannels
changeset 59076 998df1368cca
parent 59052 15e9a570c6e6
child 59090 fb91b01624be
equal deleted inserted replaced
59074:7917f95f74c4 59076:998df1368cca
   170                     ensureOpen();
   170                     ensureOpen();
   171                     if (state == ST_CONNECTIONPENDING)
   171                     if (state == ST_CONNECTIONPENDING)
   172                         throw new ConnectionPendingException();
   172                         throw new ConnectionPendingException();
   173                     if (localAddress != null)
   173                     if (localAddress != null)
   174                         throw new AlreadyBoundException();
   174                         throw new AlreadyBoundException();
   175                     if (local == null)
       
   176                         throw new NullPointerException(); // TODO: ??
       
   177                     UnixDomainSocketAddress usa = Net.checkUnixAddress(local);
   175                     UnixDomainSocketAddress usa = Net.checkUnixAddress(local);
   178                     Net.unixDomainBind(fd, usa);
   176                     Net.unixDomainBind(fd, usa);
   179                     localAddress = Net.localUnixAddress(fd);
   177                     localAddress = Net.localUnixAddress(fd);
   180                 }
   178                 }
   181             } finally {
   179             } finally {