mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
7122342: testPrintProcessorInfo/TestWithXstdout.java failed for JDK8 nightly build at 12/16/2011
Do not pass empty args to javac Reviewed-by: jjg
This commit is contained in:
parent
e559289081
commit
441d03061d
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue