Sfoglia il codice sorgente

protect against NPE for inheritance and annotation style

tags/V1_9_8
Andy Clement 2 anni fa
parent
commit
a6697eca30

+ 2
- 3
org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java Vedi File

@@ -1147,13 +1147,12 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate {
} else {
kind = null;
}
} else if (binding instanceof SourceTypeBinding) {
} else if (binding instanceof SourceTypeBinding && ((SourceTypeBinding)binding).scope != null) {
SourceTypeBinding sourceSc = (SourceTypeBinding) binding;
if (sourceSc.scope.referenceContext instanceof AspectDeclaration) {
// code style
kind = ((AspectDeclaration) sourceSc.scope.referenceContext).perClause.getKind();
} else { // if (sourceSc.scope.referenceContext instanceof
// TypeDeclaration) {
} else { // if (sourceSc.scope.referenceContext instanceof TypeDeclaration) {
// if @Aspect: perFromSuper, else if @Aspect(..) get from anno
// value, else null
kind = getPerClauseForTypeDeclaration((sourceSc.scope.referenceContext));

Loading…
Annulla
Salva