src/share/classes/java/lang/ProcessBuilder.java

Print this page
rev 3186 : 6880112: Project Coin: Port JDK core library code to use diamond operator

@@ -212,11 +212,11 @@
      * command.
      *
      * @param command a string array containing the program and its arguments
      */
     public ProcessBuilder(String... command) {
-        this.command = new ArrayList<String>(command.length);
+        this.command = new ArrayList<>(command.length);
         for (String arg : command)
             this.command.add(arg);
     }
 
     /**

@@ -249,11 +249,11 @@
      *
      * @param  command a string array containing the program and its arguments
      * @return this process builder
      */
     public ProcessBuilder command(String... command) {
-        this.command = new ArrayList<String>(command.length);
+        this.command = new ArrayList<>(command.length);
         for (String arg : command)
             this.command.add(arg);
         return this;
     }