Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Ulch2018-02-02 17:25:13 +0000
committerRyan Ulch2018-02-06 22:40:36 +0000
commita082d9550157297b7771a1955900a547a3465340 (patch)
treebeedda608b75ebf52dc77904114f66f853991c65
parentbd6454631407e0e709d9e9d18a3bf3e1aecf2242 (diff)
downloadeclipse.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>
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ModuleCompilationTests.java4
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java4
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)

Back to the top