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

InetSocketAddress::toString not friendly to IPv6 literal addresses

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b20
    • Verification:
      Verified

      Description

      Reported on core-libs-dev and further discussed here:
      https://mail.openjdk.java.net/pipermail/net-dev/2019-June/012741.html

      The issue here seems to be that InetSocketAddress::toString is specified to call InetAddress.toString() and concatenate :<port>. This doesn't align with the implementation and is also not friendly to IPv6 literal addresses, eg:

      new InetSocketAddress("::1", 8080).toString()

      prints "/0:0:0:0:0:0:0:1:8080" when users will expect "[::1]:80)" (no slash).

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              Assignee:
              jboes Julia Boes
              Reporter:
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: