JDK-8236105 : Behaviors of DatagramSocket/DatagramChannel::socket send methods are not always consistent
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-17
  • Updated: 2020-04-20
  • Resolved: 2020-01-20
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 15
15 b07Fixed
Related Reports
Blocks :  
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8237530 :  
Description
DatagramSocket does not specify what happens if the socket is not connected and DatagramPacket.getPort() is -1, or DatagramPacket.getAddress() is any local address. 

DatagramChannel also doesn't specify what happens if the target address contains the wildcard address
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/67e7f7e8284a User: pconcannon Date: 2020-01-20 16:26:00 +0000
20-01-2020

Just on DataramChannel.send throwing BindException. This error is probably EADDRNOTAVAIL and is gets mapped to a BindException. This mapping is good when the operation is bind but maybe not send. We could look at replacing the usage of handleSocketError in the send code to only handle a few specific errors that are interesting to send.
09-01-2020