langtools/src/share/classes/com/sun/tools/classfile/ReferenceFinder.java
changeset 22163 3651128c74eb
parent 17284 7cae365bf8d5
--- a/langtools/src/share/classes/com/sun/tools/classfile/ReferenceFinder.java	Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ReferenceFinder.java	Wed Dec 18 16:05:18 2013 -0500
@@ -94,7 +94,7 @@
      * @throws ConstantPoolException if an error of the constant pool
      */
     public boolean parse(ClassFile cf) throws ConstantPoolException {
-        List<Integer> cprefs = new ArrayList<Integer>();
+        List<Integer> cprefs = new ArrayList<>();
         int index = 1;
         for (ConstantPool.CPInfo cpInfo : cf.constant_pool.entries()) {
             if (cpInfo.accept(cpVisitor, cf.constant_pool)) {
@@ -108,7 +108,7 @@
         }
 
         for (Method m : cf.methods) {
-            Set<Integer> ids = new HashSet<Integer>();
+            Set<Integer> ids = new HashSet<>();
             Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code);
             if (c_attr != null) {
                 for (Instruction instr : c_attr.getInstructions()) {
@@ -119,7 +119,7 @@
                 }
             }
             if (ids.size() > 0) {
-                List<CPRefInfo> refInfos = new ArrayList<CPRefInfo>(ids.size());
+                List<CPRefInfo> refInfos = new ArrayList<>(ids.size());
                 for (int id : ids) {
                     refInfos.add(CPRefInfo.class.cast(cf.constant_pool.get(id)));
                 }