< prev index next >

src/com/sun/javatest/util/Properties.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

@@ -534,11 +534,11 @@
      *          the keys in the default property list.
      * @see     java.util.Enumeration
      * @see     com.sun.javatest.util.Properties#defaults
      * @since   JDK1.0
      */
-    public Enumeration propertyNames() {
+    public Enumeration<String> propertyNames() {
         Hashtable<String, String> h = new Hashtable<>();
         enumerate(h);
         return h.keys();
     }
 

@@ -585,12 +585,12 @@
      */
     private synchronized void enumerate(Map<String, String> h) {
         if (defaults != null) {
             defaults.enumerate(h);
         }
-        for (Enumeration e = keys() ; e.hasMoreElements() ;) {
-            String key = (String)e.nextElement();
+        for (Enumeration<String> e = keys() ; e.hasMoreElements() ;) {
+            String key = e.nextElement();
             h.put(key, get(key));
         }
     }
 
     /**
< prev index next >