Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225499 InetSocketAddress::toString not friendly to IPv6 literal addresses
  3. JDK-8232369

Release Note: InetSocketAddress.toString Format Changes for IPv6 Literals and Unresolved Addresses

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: core-libs
    • Subcomponent:
    • Verification:
      Verified

      Description

      The method `InetSocketAddress::toString` has been improved regarding the handling of IPv6 addresses. The implementation now encloses the IPv6 literal in brackets, which adheres to the specification outlined in <a href="https://tools.ietf.org/html/rfc2732" target="_blank">RFC2732</a>.

      Additionally, the string format for unresolved addresses has been changed. The method now represents the literal IP address with the token `<unresolved>`, for example: `foo/<unresolved>:80` instead of `foo:80`. This is based on `InetAddress::toString`, which returns a string of the form "hostname / literal IP address".
      To retrieve a string representation of the hostname, or the string form of the address if it doesn't have a hostname, use `InetSocketAddress::getHostString`, rather than parsing the string representation.

        Attachments

          Activity

            People

            • Assignee:
              jboes Julia Boes
              Reporter:
              jboes Julia Boes
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: