Julia,
On 09/10/2019 12:24, Julia Boes wrote:
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
I think this is good.
The specification for InetSocketAddress already defines the term
"unresolved", and putting it in the string representation removes any
potential for ambiguity. I also agree with adding the square brackets to
IPv6 literals.
-Chris.