diff options
author | Ryan Ulch | 2018-02-02 17:25:13 +0000 |
---|---|---|
committer | Ryan Ulch | 2018-02-06 22:40:36 +0000 |
commit | a082d9550157297b7771a1955900a547a3465340 (patch) | |
tree | beedda608b75ebf52dc77904114f66f853991c65 | |
parent | bd6454631407e0e709d9e9d18a3bf3e1aecf2242 (diff) | |
download | eclipse.jdt.core-a082d9550157297b7771a1955900a547a3465340.tar.gz eclipse.jdt.core-a082d9550157297b7771a1955900a547a3465340.tar.xz eclipse.jdt.core-a082d9550157297b7771a1955900a547a3465340.zip |
Bug 530575 - Fix batch compiler module-path handlingI20180207-2000
Change-Id: I4526268525ea219a9631c445cec82fc4837a7b49
Signed-off-by: Ryan Ulch <rulch@synopsys.com>
2 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java index 8a637be703..3a171c05cb 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java @@ -4768,7 +4768,7 @@ public void testBug521362_emptyFile() { false, "not in a module on the module source path"); } - public void _testBug530575() { + public void testBug530575() { File outputDirectory = new File(OUTPUT_DIR); Util.flushDirectoryContent(outputDirectory); String out = "bin"; @@ -4828,7 +4828,7 @@ public void testBug521362_emptyFile() { .append(" -classpath \"") .append(Util.getJavaClassLibsAsString()) .append("\" ") - .append(" --module-path " + "\"" + OUTPUT_DIR + File.separator + out + File.separator + "mod.x;" + OUTPUT_DIR + File.separator + out + File.separator + "mod.y" + "\""); + .append(" --module-path " + "\"" + OUTPUT_DIR + File.separator + out + File.separator + "mod.x" + File.pathSeparator + OUTPUT_DIR + File.separator + out + File.separator + "mod.y" + "\""); runConformModuleTest(files, buffer, "", diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java index d6ee3f1064..d5ead5dac8 100644 --- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java +++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java @@ -3513,8 +3513,8 @@ protected ArrayList<FileSystem.Classpath> handleModulepath(String arg) { for (String path : modulePaths) { File file = new File(path); if (file.isDirectory()) { - result = - (ArrayList<Classpath>) ModuleFinder.findModules(file, null, getNewParser(), this.options, true); + result.addAll( + ModuleFinder.findModules(file, null, getNewParser(), this.options, true)); } else { Classpath modulePath = ModuleFinder.findModule(file, null, getNewParser(), this.options, true); if (modulePath != null) |