langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
changeset 22163 3651128c74eb
parent 22159 682da512ec17
child 22165 ec53c8946fc2
--- a/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java	Wed Dec 18 16:05:18 2013 -0500
@@ -96,7 +96,7 @@
     static Set<String> getLegacyPackages() {
         ResourceBundle legacyBundle
             = ResourceBundle.getBundle("com.sun.tools.javac.resources.legacy");
-        Set<String> keys = new HashSet<String>();
+        Set<String> keys = new HashSet<>();
         for (Enumeration<String> e = legacyBundle.getKeys(); e.hasMoreElements(); )
             keys.add(e.nextElement());
         return keys;
@@ -129,7 +129,7 @@
     void createSymbols() throws IOException {
         Set<String> legacy = getLegacyPackages();
         Set<String> legacyProprietary = getLegacyPackages();
-        Set<String> documented = new HashSet<String>();
+        Set<String> documented = new HashSet<>();
         Set<PackageSymbol> packages =
             ((JavacProcessingEnvironment)processingEnv).getSpecifiedPackages();
         Map<String,String> pOptions = processingEnv.getOptions();
@@ -158,7 +158,7 @@
         fm.setLocation(StandardLocation.CLASS_PATH, List.<File>nil());
         fm.setLocation(StandardLocation.SOURCE_PATH, List.<File>nil());
         {
-            ArrayList<File> bootClassPath = new ArrayList<File>();
+            ArrayList<File> bootClassPath = new ArrayList<>();
             bootClassPath.add(jarFile);
             for (File path : fm.getLocation(StandardLocation.PLATFORM_CLASS_PATH)) {
                 if (!new File(path.getName()).equals(new File("rt.jar")))
@@ -173,8 +173,8 @@
             if (!destDir.mkdirs())
                 throw new RuntimeException("Could not create " + destDir);
         fm.setLocation(StandardLocation.CLASS_OUTPUT, List.of(destDir));
-        Set<String> hiddenPackages = new HashSet<String>();
-        Set<String> crisp = new HashSet<String>();
+        Set<String> hiddenPackages = new HashSet<>();
+        Set<String> crisp = new HashSet<>();
         List<String> options = List.of("-XDdev");
         // options = options.prepend("-doe");
         // options = options.prepend("-verbose");
@@ -192,8 +192,7 @@
         Symbol.MethodSymbol profileValue = (MethodSymbol) syms.profileType.tsym.members().lookup(names.value).sym;
         for (int i = 1; i < profileAnnos.length; i++) {
             profileAnnos[i] = new Attribute.Compound(syms.profileType,
-                    List.<Pair<Symbol.MethodSymbol, Attribute>>of(
-                    new Pair<Symbol.MethodSymbol, Attribute>(profileValue, new Attribute.Constant(syms.intType, i))));
+                    List.<Pair<Symbol.MethodSymbol, Attribute>>of(new Pair<>(profileValue, new Attribute.Constant(syms.intType, i))));
         }
 
         Type.moreInfo = true;