JDK-8233141 : DatagramSocket.send doesn't specify exception thrown when no target address
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-10-29
  • Updated: 2020-02-12
  • Resolved: 2019-11-18
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 14
14 b24Fixed
Related Reports
Blocks :  
CSR :  
Sub Tasks
JDK-8234266 :  
DatagramSocket.send doesn't specify the exception thrown when the DatagramSocket is not connected and the packet doesn't have a socket address. The current implementation throws NullPointerException, it should probably be specified to throw IllegalArgumentException.
URL: https://hg.openjdk.java.net/jdk/jdk/rev/d01fe40e9cd8 User: dfuchs Date: 2019-11-18 17:05:10 +0000

Yes - there will be a CSR.

[~alanb] Thanks, This needs to be a CSR ? as it involved in spec change.

Yes, this issue will require a spec change, probably to specify IAE (the current NPE is purely accidental).

[~alanb] is it going to be a spec update for the mentioned case?