RFR: 8225499: InetSocketAddress::toString not friendly to IPv6 literal addresses
Julia Boes
julia.boes at oracle.com
Wed Oct 9 11:24:55 UTC 2019
Hi,
This fix improves the handling of IPv6 addresses in
InetSocketAddress::toString. The implementation now encloses the IPv6
literal in brackets, which wasn't done previously.
Example:
new InetSocketAddress("::1", 80).toString()
before: /0:0:0:0:0:0:0:1:80
after: /[0:0:0:0:0:0:0:1]:80
Additionally, the string format for unresolved addresses is changed to
'hostname/<unresolved>:80' to closer adhere to the format of
'hostname/IP literal:port'.
Example:
InetSocketAddress.createUnresolved("foo", 80).toString()
before: foo:80
after: foo/<unresolved>:80
Bug: https://bugs.openjdk.java.net/browse/JDK-8225499
Webrev: http://cr.openjdk.java.net/~jboes/webrevs/8225499/webrev.00/
CSR: https://bugs.openjdk.java.net/browse/JDK-8232002
Regards,
Julia
More information about the net-dev
mailing list