There is a very small window in AbstractPlainSocketImpl.getIn/OutputStream where isClosedOrPending() grabs the fdLock to check if the socket is closed, or not, and the construction of the in/output stream, where another thread may asynchronously close the socket.
http://cr.openjdk.java.net/~chegar/8003833/webrev.00/webrev/ -Chris.