am bc06158a: Merge "Check for null in LocalSocketImpl.SocketInputStream.available()"

* commit 'bc06158a78297747605981702c8e41956ea1aa2d':
  Check for null in LocalSocketImpl.SocketInputStream.available()
This commit is contained in:
Jeff Sharkey
2014-05-21 16:05:34 +00:00
committed by Android Git Automerger

View File

@@ -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} */