--- a/jdk/src/share/classes/javax/management/remote/rmi/RMIServerImpl.java Fri May 03 10:43:24 2013 +0800
+++ b/jdk/src/share/classes/javax/management/remote/rmi/RMIServerImpl.java Thu May 02 13:21:09 2013 +0200
@@ -474,6 +474,15 @@
String clientHost = "";
try {
clientHost = RemoteServer.getClientHost();
+ /*
+ * According to the rules specified in the javax.management.remote
+ * package description, a numeric IPv6 address (detected by the
+ * presence of otherwise forbidden ":" character) forming a part
+ * of the connection id must be enclosed in square brackets.
+ */
+ if (clientHost.contains(":")) {
+ clientHost = "[" + clientHost + "]";
+ }
} catch (ServerNotActiveException e) {
logger.trace("makeConnectionId", "getClientHost", e);
}