-
Bug
-
Resolution: Fixed
-
P4
-
6u13, openjdk8u282
-
b01
-
x86
-
solaris_10
Connect a non-blocking SocketChannel to a server and get the associated Socket. From the Socket get the associated InputStream. Close the SocketChannel and then read from the InputStream. A ClosedChannelException is expected but instead we get an IllegalBlockingModeException. While it is true that the blocking mode is illegal, the SocketChannel being closed, the blocking mode is unimportant for a read() operation.
When the SocketChannel is in blocking mode, the correct exception (ClosedChannelException) is thrown.
A sample application that reproduces this problem is attached.
Seen on:
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
When the SocketChannel is in blocking mode, the correct exception (ClosedChannelException) is thrown.
A sample application that reproduces this problem is attached.
Seen on:
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)
- duplicates
-
JDK-8260875 (sc)SocketAdaptor$SocketInputStream read throws IllegalBlockingModeException on closed channel
- Closed
- relates to
-
JDK-8246707 (sc) SocketChannel.read/write throws AsynchronousCloseException on closed channel
- Resolved