Skip to content

Commit 648ba67

Browse files
martinuyRealCLanger
authored andcommitted
8339180: Enhanced Building of Processes: Follow-on Issue
Reviewed-by: yan Backport-of: a71624a69ec5cc8600f2a3a53c23c75b43068830
1 parent 12ca8b9 commit 648ba67

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ private static String[] getTokensFromCommand(String command) {
220220
// We guarantee the only command file execution for implicit [cmd.exe] run.
221221
// http://technet.microsoft.com/en-us/library/bb490954.aspx
222222
// All space characters require quoting are checked in needsEscaping().
223-
"\t\"<>&|^",
224-
"\t\"<>",
225-
"\t\"<>",
226-
"\t"
223+
"\"<>&|^",
224+
"\"<>",
225+
"\"<>",
226+
""
227227
};
228228

229229
private static String createCommandLine(int verificationType,
@@ -344,6 +344,7 @@ private static boolean needsEscaping(int verificationType, String arg) {
344344
continue; // skip over common characters
345345
// All space chars require quotes and other mode specific characters
346346
if (Character.isSpaceChar(ch) ||
347+
Character.isWhitespace(ch) ||
347348
ESCAPE_VERIFICATION[verificationType].indexOf(ch) >= 0) {
348349
return true;
349350
}

0 commit comments

Comments
 (0)