Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: 6u13, openjdk8u282
-
Fix Version/s: openjdk8u302
-
Component/s: core-libs
-
Subcomponent:
-
Resolved In Build:b01
-
CPU:x86
-
OS:solaris_10
Description
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)
Attachments
Issue Links
- 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
-