提交 3c0d4c78 编写于 作者: F farvidsson

8026808: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java failed with unexpected exit value

Summary: Fixes a bug with vmArgs when using JDKToolLauncher
Reviewed-by: sla, dholmes
上级 910faddb
......@@ -100,7 +100,7 @@ public class JDKToolLauncher {
* @return The JDKToolLauncher instance
*/
public JDKToolLauncher addVMArg(String arg) {
vmArgs.add("-J" + arg);
vmArgs.add(arg);
return this;
}
......@@ -124,7 +124,10 @@ public class JDKToolLauncher {
public String[] getCommand() {
List<String> command = new ArrayList<String>();
command.add(executable);
command.addAll(vmArgs);
// Add -J in front of all vmArgs
for (String arg : vmArgs) {
command.add("-J" + arg);
}
command.addAll(toolArgs);
return command.toArray(new String[command.size()]);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册