From: aclement Date: Mon, 27 Mar 2006 19:11:57 +0000 (+0000) Subject: fix for NPE in pr132160 X-Git-Tag: V1_5_1_final~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=91473b3badbc89811be8c6223adc6b6641e496d2;p=aspectj.git fix for NPE in pr132160 --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java index b061596b0..a1da0cffd 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmElementFormatter.java @@ -227,7 +227,7 @@ public class AsmElementFormatter { //TODO AV - could speed up if we could dig only for @Aspect declaring types (or aspect if mixed style allowed) //??? how to : node.getParent().getKind().equals(IProgramElement.Kind.ASPECT)) { - if (true && methodDeclaration!=null && methodDeclaration.annotations != null) { + if (true && methodDeclaration!=null && methodDeclaration.annotations != null && methodDeclaration.scope!=null) { for (int i = 0; i < methodDeclaration.annotations.length; i++) { //Note: AV: implicit single advice type support here (should be enforced somewhere as well (APT etc)) Annotation annotation = methodDeclaration.annotations[i];