8339180: Enhanced Building of Processes: Follow-on Issue
Reviewed-by: yan, andrew
Backport-of: a71624a69ec5cc8600f2a3a53c23c75b43068830
diff --git a/src/java.base/windows/classes/java/lang/ProcessImpl.java b/src/java.base/windows/classes/java/lang/ProcessImpl.java
index a4cf68e..6ab8f23 100644
--- a/src/java.base/windows/classes/java/lang/ProcessImpl.java
+++ b/src/java.base/windows/classes/java/lang/ProcessImpl.java
@@ -215,10 +215,10 @@
// We guarantee the only command file execution for implicit [cmd.exe] run.
// http://technet.microsoft.com/en-us/library/bb490954.aspx
// All space characters require quoting are checked in needsEscaping().
- "\t\"<>&|^",
- "\t\"<>",
- "\t\"<>",
- "\t"
+ "\"<>&|^",
+ "\"<>",
+ "\"<>",
+ ""
};
private static String createCommandLine(int verificationType,
@@ -339,6 +339,7 @@
continue; // skip over common characters
// All space chars require quotes and other mode specific characters
if (Character.isSpaceChar(ch) ||
+ Character.isWhitespace(ch) ||
ESCAPE_VERIFICATION[verificationType].indexOf(ch) >= 0) {
return true;
}