diff options
author | Stephan Herrmann | 2018-11-15 22:12:32 +0000 |
---|---|---|
committer | Stephan Herrmann | 2018-11-15 22:12:32 +0000 |
commit | 4ca6ea52439bbf09da333dd0c955ea1b885c2b9d (patch) | |
tree | b940a756377a2304fa03a406a5b80d56d469dc69 /org.eclipse.jdt.core/compiler/org | |
parent | dd3a278b906114fedcdb46af8aca43eac75b3bfe (diff) | |
download | eclipse.jdt.core-4ca6ea52439bbf09da333dd0c955ea1b885c2b9d.tar.gz eclipse.jdt.core-4ca6ea52439bbf09da333dd0c955ea1b885c2b9d.tar.xz eclipse.jdt.core-4ca6ea52439bbf09da333dd0c955ea1b885c2b9d.zip |
Bug 541015 - Module-related NPE Compiling Java 11 codeI20181117-0600I20181116-1800
Change-Id: I3ec5fe8575cbd11d80618c14658ce7b7b37cc95b
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java | 4 |
1 files changed, 2 insertions, 2 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 f9f9ba350d..7c37358a0b 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 @@ -300,6 +300,8 @@ ReferenceBinding askForType(PackageBinding packageBinding, char[] name, ModuleBi ReferenceBinding candidate = null; for (NameEnvironmentAnswer answer : answers) { if (answer == null) continue; + if (candidate != null && candidate.problemId() == ProblemReasons.Ambiguous) + return candidate; // saw enough ModuleBinding answerModule = answer.moduleBinding != null ? answer.moduleBinding : this.UnNamedModule; PackageBinding answerPackage = packageBinding; @@ -343,8 +345,6 @@ ReferenceBinding askForType(PackageBinding packageBinding, char[] name, ModuleBi continue; } candidate = combine(candidate, answerPackage.getType0(name), clientModule); - if (candidate != null && candidate.problemId() == ProblemReasons.Ambiguous) - return candidate; // saw enough } return candidate; } |