src/share/classes/sun/rmi/registry/RegistryImpl.java

Print this page

        

@@ -75,13 +75,13 @@
 {
 
     /* indicate compatibility with JDK 1.1.x version of class */
     private static final long serialVersionUID = 4666870661827494597L;
     private Hashtable<String, Remote> bindings
-        = new Hashtable<String, Remote>(101);
+        = new Hashtable<>(101);
     private static Hashtable<InetAddress, InetAddress> allowedAccessCache
-        = new Hashtable<InetAddress, InetAddress>(3);
+        = new Hashtable<>(3);
     private static RegistryImpl registry;
     private static ObjID id = new ObjID(ObjID.REGISTRY_ID);
 
     private static ResourceBundle resources = null;
 

@@ -192,13 +192,13 @@
     {
         String[] names;
         synchronized (bindings) {
             int i = bindings.size();
             names = new String[i];
-            Enumeration enum_ = bindings.keys();
+            Enumeration<String> enum_ = bindings.keys();
             while ((--i) >= 0)
-                names[i] = (String)enum_.nextElement();
+                names[i] = enum_.nextElement();
         }
         return names;
     }
 
     /**