changeset 11880:fff8ab918557

8076486: [TESTBUG] javax/security/auth/Subject/doAs/NestedActions.java fails if extra VM options are given Reviewed-by: weijun
author asmotrak
date Wed, 06 May 2015 09:22:03 +0800
parents cb35b067c91d
children 5d018ec41792
files test/javax/security/auth/Subject/doAs/NestedActions.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/security/auth/Subject/doAs/NestedActions.java	Tue May 05 18:18:06 2015 -0700
+++ b/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]);