Skip to content

Commit fa83309

Browse files
Roger Riggsjaikiran
Roger Riggs
authored andcommittedJan 22, 2025
8339180: Enhanced Building of Processes: Follow-on Issue
Reviewed-by: naoto, djelinski
1 parent 496d06f commit fa83309

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ private static String[] getTokensFromCommand(String command) {
208208
// We guarantee the only command file execution for implicit [cmd.exe] run.
209209
// http://technet.microsoft.com/en-us/library/bb490954.aspx
210210
// All space characters require quoting are checked in needsEscaping().
211-
"\t\"<>&|^",
212-
"\t\"<>",
213-
"\t\"<>",
214-
"\t"
211+
"\"<>&|^",
212+
"\"<>",
213+
"\"<>",
214+
""
215215
};
216216

217217
private static String createCommandLine(int verificationType,
@@ -332,6 +332,7 @@ private static boolean needsEscaping(int verificationType, String arg) {
332332
continue; // skip over common characters
333333
// All space chars require quotes and other mode specific characters
334334
if (Character.isSpaceChar(ch) ||
335+
Character.isWhitespace(ch) ||
335336
ESCAPE_VERIFICATION[verificationType].indexOf(ch) >= 0) {
336337
return true;
337338
}

0 commit comments

Comments
 (0)
Please sign in to comment.