Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2019-11-26 16:25:03 +0000
committerJeff Johnston2019-11-26 17:25:13 +0000
commit362b8a1d67b06933194e2e17a7048c92498007dc (patch)
tree0250033016c12d535a568d12a26b0490f88924ea
parent530d24dc4b78515d46c914d8f9167dd995e74ad6 (diff)
downloadeclipse.jdt.core-362b8a1d67b06933194e2e17a7048c92498007dc.tar.gz
eclipse.jdt.core-362b8a1d67b06933194e2e17a7048c92498007dc.tar.xz
eclipse.jdt.core-362b8a1d67b06933194e2e17a7048c92498007dc.zip
Bug 553472 - NPE while resolving module javadocS4_14_0_RC1I20191127-1800I20191127-0600
- add check for ModuleDeclaration in getDeclarationModifiers() Change-Id: Ic1649e58d3f96860d34fed3f4707f5cbab12b053
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index b12939745a..0742835abe 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -2530,6 +2530,10 @@ public abstract class Scope {
MethodScope methodScope = methodScope();
if (!methodScope.isInsideInitializer()){
// check method modifiers to see if deprecated
+ ReferenceContext ref = methodScope.referenceContext();
+ if (ref instanceof ModuleDeclaration) {
+ return ((ModuleDeclaration)ref).modifiers;
+ }
MethodBinding context = ((AbstractMethodDeclaration)methodScope.referenceContext).binding;
if (context != null)
return context.modifiers;

Back to the top