提交 9675913d 编写于 作者: J jjh

7122342: testPrintProcessorInfo/TestWithXstdout.java failed for JDK8 nightly build at 12/16/2011

Summary: Do not pass empty args to javac
Reviewed-by: jjg
上级 84c5e4c4
......@@ -58,11 +58,14 @@ public class TestWithXstdout {
if (javaHome.getName().equals("jre"))
javaHome = javaHome.getParentFile();
File javac = new File(new File(javaHome, "bin"), "javac");
String toolOpts = System.getProperty("test.tool.vm.opts");
List<String> opts = new ArrayList<>();
opts.add(javac.getPath());
opts.addAll(Arrays.asList(toolOpts.trim().split("[\\s]+")));
String toolOpts = System.getProperty("test.tool.vm.opts");
if (toolOpts != null && !"".equals(toolOpts.trim())) {
opts.addAll(Arrays.asList(toolOpts.trim().split("[\\s]+")));
}
opts.addAll(Arrays.asList(args));
System.out.println("exec: " + opts);
ProcessBuilder pb = new ProcessBuilder(opts);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册