jdk/src/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java
changeset 24685 215fa91e1b4c
parent 10324 e28265130e4f
equal deleted inserted replaced
24652:4a09f5d30be8 24685:215fa91e1b4c
   334                     "host was unspecified or specified as \"localhost\""));
   334                     "host was unspecified or specified as \"localhost\""));
   335         }
   335         }
   336         String url = "rmi://";
   336         String url = "rmi://";
   337 
   337 
   338         // Enclose IPv6 literal address in '[' and ']'
   338         // Enclose IPv6 literal address in '[' and ']'
   339         url = (host.indexOf(":") > -1) ? url + "[" + host + "]" :
   339         url = (host.indexOf(':') > -1) ? url + "[" + host + "]" :
   340                                          url + host;
   340                                          url + host;
   341         if (port > 0) {
   341         if (port > 0) {
   342             url += ":" + Integer.toString(port);
   342             url += ":" + Integer.toString(port);
   343         }
   343         }
   344         RefAddr addr = new StringRefAddr(RegistryContextFactory.ADDRESS_TYPE,
   344         RefAddr addr = new StringRefAddr(RegistryContextFactory.ADDRESS_TYPE,