8076486: [TESTBUG] javax/security/auth/Subject/doAs/NestedActions.java fails if extra VM options are given
Reviewed-by: weijun
--- a/jdk/test/javax/security/auth/Subject/doAs/NestedActions.java Tue May 05 18:18:06 2015 -0700
+++ b/jdk/test/javax/security/auth/Subject/doAs/NestedActions.java Wed May 06 09:22:03 2015 +0800
@@ -34,6 +34,7 @@
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
@@ -144,7 +145,7 @@
}
cmds.add(sb.toString());
if (JAVA_OPTS != null && !JAVA_OPTS.isEmpty()) {
- cmds.add(JAVA_OPTS);
+ Collections.addAll(cmds, JAVA_OPTS.trim().split("\\s+"));
}
cmds.add("-Djava.security.manager");
cmds.add("-Djava.security.policy=" + TEST_SOURCES + FS + args[1]);