Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2018-12-04 22:06:22 +0000
committerStephan Herrmann2018-12-16 18:11:34 +0000
commit391dfa15865398c9e23bedf36d40d0b48eaac38c (patch)
tree714202e8dce02e7a264b7ea6c4359fb835fd2023 /org.eclipse.jdt.core/compiler/org
parentda7450b0a69f7f564c4e3f809ea549e893a6df56 (diff)
downloadeclipse.jdt.core-391dfa15865398c9e23bedf36d40d0b48eaac38c.tar.gz
eclipse.jdt.core-391dfa15865398c9e23bedf36d40d0b48eaac38c.tar.xz
eclipse.jdt.core-391dfa15865398c9e23bedf36d40d0b48eaac38c.zip
Bug 541217 - Presence of module-info.java in project breaks typeI20181216-1800
hierarchy results Change-Id: I6a4d478a709b008ec4b581789b2ff260315df95c Signed-off-by: Stephan Herrmann <stephan.herrmann@berlin.de> Also-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index 7c37358a0b..e06463c6b8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -1441,6 +1441,21 @@ public AccessRestriction getAccessRestriction(TypeBinding type) {
* assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer.
*/
public ReferenceBinding getCachedType(char[][] compoundName) {
+ ReferenceBinding result = getCachedType0(compoundName);
+ if (result == null && this.useModuleSystem) {
+ ModuleBinding[] modulesToSearch = this.module.isUnnamed() || this.module.isAuto
+ ? this.root.knownModules.valueTable
+ : this.module.getAllRequiredModules();
+ for (ModuleBinding someModule : modulesToSearch) {
+ if (someModule == null) continue;
+ result = someModule.environment.getCachedType0(compoundName);
+ if (result != null && result.isValidBinding())
+ break;
+ }
+ }
+ return result;
+}
+public ReferenceBinding getCachedType0(char[][] compoundName) {
if (compoundName.length == 1) {
return this.defaultPackage.getType0(compoundName[0]);
}

Back to the top