Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/classes/sun/rmi/registry/RegistryImpl.java
          +++ new/src/share/classes/sun/rmi/registry/RegistryImpl.java
↓ open down ↓ 69 lines elided ↑ open up ↑
  70   70   *
  71   71   * @see java.rmi.registry.LocateRegistry
  72   72   */
  73   73  public class RegistryImpl extends java.rmi.server.RemoteServer
  74   74          implements Registry
  75   75  {
  76   76  
  77   77      /* indicate compatibility with JDK 1.1.x version of class */
  78   78      private static final long serialVersionUID = 4666870661827494597L;
  79   79      private Hashtable<String, Remote> bindings
  80      -        = new Hashtable<String, Remote>(101);
       80 +        = new Hashtable<>(101);
  81   81      private static Hashtable<InetAddress, InetAddress> allowedAccessCache
  82      -        = new Hashtable<InetAddress, InetAddress>(3);
       82 +        = new Hashtable<>(3);
  83   83      private static RegistryImpl registry;
  84   84      private static ObjID id = new ObjID(ObjID.REGISTRY_ID);
  85   85  
  86   86      private static ResourceBundle resources = null;
  87   87  
  88   88      /**
  89   89       * Construct a new RegistryImpl on the specified port with the
  90   90       * given custom socket factory pair.
  91   91       */
  92   92      public RegistryImpl(int port,
↓ open down ↓ 94 lines elided ↑ open up ↑
 187  187       * Returns an enumeration of the names in the registry.
 188  188       * @exception RemoteException If remote operation failed.
 189  189       */
 190  190      public String[] list()
 191  191          throws RemoteException
 192  192      {
 193  193          String[] names;
 194  194          synchronized (bindings) {
 195  195              int i = bindings.size();
 196  196              names = new String[i];
 197      -            Enumeration enum_ = bindings.keys();
      197 +            Enumeration<String> enum_ = bindings.keys();
 198  198              while ((--i) >= 0)
 199      -                names[i] = (String)enum_.nextElement();
      199 +                names[i] = enum_.nextElement();
 200  200          }
 201  201          return names;
 202  202      }
 203  203  
 204  204      /**
 205  205       * Check that the caller has access to perform indicated operation.
 206  206       * The client must be on same the same host as this server.
 207  207       */
 208  208      public static void checkAccess(String op) throws AccessException {
 209  209  
↓ open down ↓ 212 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX