JDK-8241995 : Clarify InetSocketAddress::toString specification
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 14,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-01
  • Updated: 2021-02-08
  • Resolved: 2021-02-03
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 17
17 b08Fixed
Related Reports
Relates :  
Description
The current specification wording for InetSocketAddress::toString is:

  "Constructs a string representation of this InetSocketAddress. This String
   is constructed by calling toString() on the InetAddress and concatenating
   the port number (with a colon). If the address is an IPv6 address, the IPv6
   literal is enclosed in square brackets. If the address is unresolved, 
  <unresolved> is displayed in place of the address literal."

The wording could be improved a little to avoid any potential confusion about how and when "<unresolved>" is displayed.

This issue is filed in response to a question that was raised on net-dev, see:
  https://mail.openjdk.java.net/pipermail/net-dev/2020-March/013725.html
  https://mail.openjdk.java.net/pipermail/net-dev/2020-April/013747.html
Comments
Changeset: b0ee7a86 Author: Julia Boes <jboes@openjdk.org> Date: 2021-02-03 14:15:00 +0000 URL: https://git.openjdk.java.net/jdk/commit/b0ee7a86
03-02-2021

Initial suggested wording and comments: https://mail.openjdk.java.net/pipermail/net-dev/2020-April/013776.html
25-06-2020