JDK-8219446 : Specify behaviour of timeout accepting methods of Socket and ServerSocket if timeout is negative
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-02-20
  • Updated: 2019-09-24
  • Resolved: 2019-03-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b14Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
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.
Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/6183f835b9b6 User: chegar Date: 2019-03-26 17:03:25 +0000
26-03-2019