* commit '9ef2117f0e65db60cb3f9708174bcaca4db813b2': Check for null in LocalSocketImpl.SocketInputStream.available()
This commit is contained in:
@@ -56,7 +56,10 @@ class LocalSocketImpl
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
return available_native(fd);
|
||||
FileDescriptor myFd = fd;
|
||||
if (myFd == null) throw new IOException("socket closed");
|
||||
|
||||
return available_native(myFd);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
|
||||
Reference in New Issue
Block a user