diff options
author | Jeff Johnston | 2019-11-26 16:25:03 +0000 |
---|---|---|
committer | Jeff Johnston | 2019-11-26 17:25:13 +0000 |
commit | 362b8a1d67b06933194e2e17a7048c92498007dc (patch) | |
tree | 0250033016c12d535a568d12a26b0490f88924ea | |
parent | 530d24dc4b78515d46c914d8f9167dd995e74ad6 (diff) | |
download | eclipse.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.java | 4 |
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; |