JDK-8237890 : DatagramPacket::getSocketAddress doesn't specify what happens if address or port are not set
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 15
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2020-01-27
  • Updated: 2020-04-27
  • Resolved: 2020-04-22
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 b20Fixed
Related Reports
Blocks :  
CSR :  
Duplicate :  
Relates :  
Relates :  
Sub Tasks
JDK-8243390 :  
Description
See https://mail.openjdk.java.net/pipermail/net-dev/2020-January/013532.html
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/37fb240579e5 User: pconcannon Date: 2020-04-22 11:37:26 +0000
22-04-2020

Three possible courses here order by perceived risk of regression: 1. specify IAE if port not set and wildcard if address not set (throws IAE only if port not set, current unspecified behavior) 2. specify wildcard if address is not set, and port 0 if port is not set (never throws) 3. specify that null is returned if either port or address are not set (never throws) 4. specify that port is 0 when not set. It might be interesting to try out options 2., 3., and 4. and run the tests + jck to see what would start failing.
27-01-2020