Skip to content

Commit 129290d

Browse files
martinuygnu-andrew
authored andcommitted
8339180: Enhanced Building of Processes: Follow-on Issue
Reviewed-by: yan, andrew Backport-of: a71624a69ec5cc8600f2a3a53c23c75b43068830
1 parent c2f7e61 commit 129290d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

jdk/src/windows/classes/java/lang/ProcessImpl.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ private static String[] getTokensFromCommand(String command) {
182182
// We guarantee the only command file execution for implicit [cmd.exe] run.
183183
// http://technet.microsoft.com/en-us/library/bb490954.aspx
184184
// All space characters require quoting are checked in needsEscaping().
185-
"\t\"<>&|^",
186-
"\t\"<>",
187-
"\t\"<>",
188-
"\t"
185+
"\"<>&|^",
186+
"\"<>",
187+
"\"<>",
188+
""
189189
};
190190

191191
private static String createCommandLine(int verificationType,
@@ -300,6 +300,7 @@ private static boolean needsEscaping(int verificationType, String arg) {
300300
continue; // skip over common characters
301301
// All space chars require quotes and other mode specific characters
302302
if (Character.isSpaceChar(ch) ||
303+
Character.isWhitespace(ch) ||
303304
ESCAPE_VERIFICATION[verificationType].indexOf(ch) >= 0) {
304305
return true;
305306
}

0 commit comments

Comments
 (0)