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,222 **** * command. * * @param command a string array containing the program and its arguments */ public ProcessBuilder(String... command) { ! this.command = new ArrayList<String>(command.length); for (String arg : command) this.command.add(arg); } /** --- 212,222 ---- * command. * * @param command a string array containing the program and its arguments */ public ProcessBuilder(String... command) { ! this.command = new ArrayList<>(command.length); for (String arg : command) this.command.add(arg); } /**
*** 249,259 **** * * @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); for (String arg : command) this.command.add(arg); return this; } --- 249,259 ---- * * @param command a string array containing the program and its arguments * @return this process builder */ public ProcessBuilder command(String... command) { ! this.command = new ArrayList<>(command.length); for (String arg : command) this.command.add(arg); return this; }