diff graal/com.oracle.max.asmdis/src/com/sun/max/asm/gen/risc/RiscTemplateCreator.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.asmdis/src/com/sun/max/asm/gen/risc/RiscTemplateCreator.java	Sun Dec 18 05:23:52 2011 +0100
+++ b/graal/com.oracle.max.asmdis/src/com/sun/max/asm/gen/risc/RiscTemplateCreator.java	Sun Dec 18 05:24:06 2011 +0100
@@ -35,7 +35,7 @@
     public RiscTemplateCreator() {
     }
 
-    private List<RiscTemplate> templates = new LinkedList<RiscTemplate>();
+    private List<RiscTemplate> templates = new LinkedList<>();
 
     public List<RiscTemplate> templates() {
         return templates;
@@ -46,7 +46,7 @@
     }
 
     public List<RiscTemplate> createOptionTemplates(List<RiscTemplate> templateList, OptionField optionField) {
-        final List<RiscTemplate> newTemplates = new LinkedList<RiscTemplate>();
+        final List<RiscTemplate> newTemplates = new LinkedList<>();
         for (RiscTemplate template : templateList) {
             RiscTemplate canonicalRepresentative = null;
             if (optionField.defaultOption() != null) {
@@ -67,12 +67,13 @@
     }
 
     private int serial;
+    @SuppressWarnings("serial")
     private HashMap<String, List<RiscTemplate>> nameToTemplates = new HashMap<String, List<RiscTemplate>>() {
         @Override
         public List<RiscTemplate> get(Object key) {
             List<RiscTemplate> list = super.get(key);
             if (list == null) {
-                list = new ArrayList<RiscTemplate>();
+                list = new ArrayList<>();
                 put((String) key, list);
             }
             return list;
@@ -84,14 +85,14 @@
     }
 
     public void createTemplates(RiscInstructionDescriptionCreator instructionDescriptionCreator) {
-        final List<RiscTemplate> initialTemplates = new LinkedList<RiscTemplate>();
+        final List<RiscTemplate> initialTemplates = new LinkedList<>();
         for (InstructionDescription instructionDescription : instructionDescriptionCreator.instructionDescriptions()) {
             final RiscTemplate template = createTemplate(instructionDescription);
             initialTemplates.add(template);
             RiscInstructionDescriptionVisitor.Static.visitInstructionDescription(template, instructionDescription);
         }
         for (RiscTemplate initialTemplate : initialTemplates) {
-            List<RiscTemplate> newTemplates = new LinkedList<RiscTemplate>();
+            List<RiscTemplate> newTemplates = new LinkedList<>();
             newTemplates.add(initialTemplate);
             for (OptionField optionField : initialTemplate.optionFields()) {
                 newTemplates = createOptionTemplates(newTemplates, optionField);