diff graal/com.oracle.max.base/src/com/sun/max/util/Registry.java @ 4142:bc8527f3071c

Adjust code base to new level of warnings.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 18 Dec 2011 05:24:06 +0100
parents e233f5660da4
children
line wrap: on
line diff
--- a/graal/com.oracle.max.base/src/com/sun/max/util/Registry.java	Sun Dec 18 05:23:52 2011 +0100
+++ b/graal/com.oracle.max.base/src/com/sun/max/util/Registry.java	Sun Dec 18 05:24:06 2011 +0100
@@ -45,9 +45,9 @@
     public Registry(Class<C> classType, boolean loadClass) {
         this.loadClass = loadClass;
         this.classClass = classType;
-        this.classMap = new HashMap<String, Class<? extends C>>();
-        this.objectMap = new HashMap<String, C>();
-        this.stringMap = new HashMap<String, String>();
+        this.classMap = new HashMap<>();
+        this.objectMap = new HashMap<>();
+        this.stringMap = new HashMap<>();
     }
 
     public void registerObject(String alias, C object) {
@@ -98,7 +98,7 @@
     }
 
     public Iterable<String> getAliases() {
-        final LinkedList<String> lista = new LinkedList<String>();
+        final LinkedList<String> lista = new LinkedList<>();
         lista.addAll(objectMap.keySet());
         lista.addAll(classMap.keySet());
         lista.addAll(stringMap.keySet());
@@ -117,6 +117,6 @@
     }
 
     public static <T> Registry<T> newRegistry(Class<T> cl) {
-        return new Registry<T>(cl, true);
+        return new Registry<>(cl, true);
     }
 }