-
Bug
-
Resolution: Fixed
-
P4
-
13
-
b14
-
Not verified
Socket.setTimeout(-1) throws IAE, which seems reasonable, but doesn't specify this case.
ServerSocket.setTimeout(-1) delegates to the SocketImpl.setOption(int,Object) method which only specifies SocketException. PlainSocketImpl throws IAE for this case so ServerSocket.setTimeout(-1) throws IAE.
socket.connect(socketAddress, -1) throws IAE, which seems reasonable, but doesn't specify this case.
These methods should be re-examined, maybe the methods can specify IAE to be thrown when the timeout is negative.
ServerSocket.setTimeout(-1) delegates to the SocketImpl.setOption(int,Object) method which only specifies SocketException. PlainSocketImpl throws IAE for this case so ServerSocket.setTimeout(-1) throws IAE.
socket.connect(socketAddress, -1) throws IAE, which seems reasonable, but doesn't specify this case.
These methods should be re-examined, maybe the methods can specify IAE to be thrown when the timeout is negative.
- csr for
-
JDK-8221248 Specify behaviour of timeout accepting methods of Socket and ServerSocket if timeout is negative
- Closed
- relates to
-
JDK-8222829 DatagramSocket.setSoTimeout does not specify IAE when timeout is negative
- Closed
-
JDK-8221481 Reimplement the Legacy Socket API
- Resolved