Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8241995

Clarify InetSocketAddress::toString specification

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 14, 15
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                chegar Chris Hegarty
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: