langtools/src/share/classes/com/sun/tools/sjavac/server/JavacServer.java
changeset 22163 3651128c74eb
parent 20241 1e178dbe29c1
child 24067 76e7b6bbbd85
--- a/langtools/src/share/classes/com/sun/tools/sjavac/server/JavacServer.java	Wed Dec 18 19:22:58 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/sjavac/server/JavacServer.java	Wed Dec 18 16:05:18 2013 -0500
@@ -101,7 +101,7 @@
      */
     private static synchronized PortFile getPortFile(String filename) throws FileNotFoundException {
         if (allPortFiles == null) {
-            allPortFiles = new HashMap<String, PortFile>();
+            allPortFiles = new HashMap<>();
         }
         PortFile pf = allPortFiles.get(filename);
         if (pf == null) {
@@ -371,7 +371,7 @@
             // If the java/sh/cmd launcher fails the failure will be captured by stdouterr because of the redirection here.
             String[] cmd = {"/bin/sh", "-c", sjavac + " >> " + stdouterrfile + " 2>&1"};
             if (!(new File("/bin/sh")).canExecute()) {
-                ArrayList<String> wincmd = new ArrayList<String>();
+                ArrayList<String> wincmd = new ArrayList<>();
                 wincmd.add("cmd");
                 wincmd.add("/c");
                 wincmd.add("start");
@@ -567,7 +567,7 @@
                 }
                 if (l.length() > 1 && l.charAt(0) == '+') {
                     String pkg = l.substring(1);
-                    lastUriSet = new HashSet<URI>();
+                    lastUriSet = new HashSet<>();
                     packageArtifacts.put(pkg, lastUriSet);
                 } else if (l.length() > 1 && lastUriSet != null) {
                     lastUriSet.add(new URI(l.substring(1)));
@@ -585,14 +585,14 @@
                 }
                 if (l.length() > 1 && l.charAt(0) == '+') {
                     String pkg = l.substring(1);
-                    lastPackageSet = new HashSet<String>();
+                    lastPackageSet = new HashSet<>();
                     packageDependencies.put(pkg, lastPackageSet);
                 } else if (l.length() > 1 && lastPackageSet != null) {
                     lastPackageSet.add(l.substring(1));
                 }
             }
             // Load package pubapis
-            Map<String, StringBuffer> tmp = new HashMap<String, StringBuffer>();
+            Map<String, StringBuffer> tmp = new HashMap<>();
             StringBuffer lastPublicApi = null;
             for (;;) {
                 String l = in.readLine();