Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2019-03-21 07:17:18 +0000
committerTill Brychcy2019-03-22 20:22:36 +0000
commit24d47c292ed4bd8fdc28b3c2f9afdab1401d025c (patch)
tree4428b3885ede6c9e633abe97144c332d45498cdc
parent0aca1a5fa4cd20f42bc0e3e5ca7e6c0bdd8570d6 (diff)
downloadeclipse.jdt.core-24d47c292ed4bd8fdc28b3c2f9afdab1401d025c.tar.gz
eclipse.jdt.core-24d47c292ed4bd8fdc28b3c2f9afdab1401d025c.tar.xz
eclipse.jdt.core-24d47c292ed4bd8fdc28b3c2f9afdab1401d025c.zip
Bug 545687 - [11] Bogus editor error "package javax.xml is accessibleI20190324-1800I20190323-1800
from more than one module: <unnamed>, java.xml" Change-Id: Icb259ba0c6745de149dc4a47e262c8a952dfcd30
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java35
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java4
2 files changed, 39 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java
index 7c7f99d85c..06ffacef01 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests9.java
@@ -649,4 +649,39 @@ public void testBug544017() throws CoreException {
deleteProject(testmain);
}
}
+
+public void testBug545687() throws CoreException, IOException {
+ if (!isJRE9)
+ return;
+ IJavaProject p = null;
+ Hashtable<String, String> options = JavaCore.getOptions();
+ try {
+ p = createJava9Project("testproj", "9");
+ createFolder("/testproj/src/javax/xml/dummy");
+ createFile("/testproj/src/javax/xml/dummy/Dummy.java", //
+ "package javax.xml.dummy;\n" + //
+ "public class Dummy {\n" + //
+ "}\n");
+ createFolder("/testproj/src/test");
+ String testSrc = "package test;\n" + //
+ "import javax.xml.XMLConstants;\n" + //
+ "public class Test {\n" + //
+ " String s = XMLConstants.NULL_NS_URI;\n" + //
+ "}\n";
+ createFile("/testproj/src/test/Test.java", testSrc);
+ this.workingCopy.discardWorkingCopy();
+ this.problemRequestor.initialize(testSrc.toCharArray());
+ this.workingCopy = getCompilationUnit("testproj/src/test/Test.java").getWorkingCopy(this.wcOwner, null);
+ this.problemRequestor.initialize(this.workingCopy.getSource().toCharArray());
+ this.workingCopy.reconcile(AST_INTERNAL_JLS11, true, this.wcOwner, null);
+ assertProblems("Expecting no problems", "----------\n" + "----------\n", this.problemRequestor);
+
+ IMarker[] markers = p.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ assertMarkers("Unexpected markers on client", "", markers);
+ } finally {
+ if (p != null)
+ deleteProject(p);
+ JavaCore.setOptions(options);
+ }
+}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
index d972ad3db1..f9ee9dba24 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ModuleBinding.java
@@ -101,6 +101,10 @@ public class ModuleBinding extends Binding implements IUpdatableModule {
return ANY;
}
@Override
+ public char[] nameForCUCheck() {
+ return UNNAMED;
+ }
+ @Override
public char[] readableName() {
return UNNAMED_READABLE_NAME;
}

Back to the top