[PATCH] JDK-7199324: IPv6 JMXConnectorServer.getConnectionIDs() return IDs contradicting address grammar
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Thu Dec 20 04:21:05 PST 2012
Looking for reviewers and a sponsor.
Webrev is available at
http://cr.openjdk.java.net/~jbachorik/JDK-7199324/webrev.00
The issue is about the JMX client connection ID not being generated
accordingly to the specification when including an IPv6 address. The
specification states that in such case the address must be enclosed in
square brackets. The current implementation, however, returns the plain
numeric address, contradicting the specification.
The fix simply checks for the presence of ":" character in the address
part of the connection ID and escapes the address if necessary. Since
the ":" can be present only in a numeric IPv6 address this check is
sufficient.
The change to test just covers for checking proper escaping - I am not
sure how to force IPv6 to be used from the test; probably it is not
possible. The test will check the IPv6 address escaping when and only
when the system setup will cause the JMX client to connect over IPv6.
Thanks,
-JB-
More information about the serviceability-dev
mailing list