]> source.dussan.org Git - aspectj.git/commitdiff
found whilst investigating 157057 - we sometimes crashed for bad input (duplicate...
authoraclement <aclement>
Thu, 14 Sep 2006 14:52:25 +0000 (14:52 +0000)
committeraclement <aclement>
Thu, 14 Sep 2006 14:52:25 +0000 (14:52 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjPipeliningCompilerAdapter.java

index b4998261c680907e1b1306bd4ef4c3bf5eb9bda0..f5c87e7d4bc9d5e1a903bed4dfe6b5c085040dd3 100644 (file)
@@ -565,6 +565,8 @@ public class AjPipeliningCompilerAdapter extends AbstractCompilerAdapter {
 
        private static final char[] aspectSig = "Lorg/aspectj/lang/annotation/Aspect;".toCharArray();
        private boolean isAspect(TypeDeclaration declaration) {
+               // avoid an NPE when something else is wrong in this system ... the real problem will be reported elsewhere
+               if (declaration.staticInitializerScope==null) return false;
                if (declaration instanceof AspectDeclaration) return true; // code style
                else if (declaration.annotations!=null) { // check for annotation style
                        for (int index = 0; index < declaration.annotations.length; index++) {