Details
-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0, 13
-
b20
-
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).
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
- csr for
-
JDK-8232002 InetSocketAddress::toString not friendly to IPv6 literal addresses
-
- Closed
-
- relates to
-
JDK-8221681 Improved IPv6 Support
-
- Open
-