< prev index next >

src/java.base/share/classes/java/lang/Runtime.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

*** 401,411 **** * @see ProcessBuilder * @since 1.3 */ public Process exec(String command, String[] envp, File dir) throws IOException { ! if (command.length() == 0) throw new IllegalArgumentException("Empty command"); StringTokenizer st = new StringTokenizer(command); String[] cmdarray = new String[st.countTokens()]; for (int i = 0; st.hasMoreTokens(); i++) --- 401,411 ---- * @see ProcessBuilder * @since 1.3 */ public Process exec(String command, String[] envp, File dir) throws IOException { ! if (command.isEmpty()) throw new IllegalArgumentException("Empty command"); StringTokenizer st = new StringTokenizer(command); String[] cmdarray = new String[st.countTokens()]; for (int i = 0; st.hasMoreTokens(); i++)
< prev index next >