From: aclement Date: Thu, 14 Sep 2006 14:52:25 +0000 (+0000) Subject: found whilst investigating 157057 - we sometimes crashed for bad input (duplicate... X-Git-Tag: BEFORE_133532~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=563711fb8fd867a89b0ffb18d68105ee35a34625;p=aspectj.git found whilst investigating 157057 - we sometimes crashed for bad input (duplicate class declarations) rather than just putting out a nice message. --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjPipeliningCompilerAdapter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjPipeliningCompilerAdapter.java index b4998261c..f5c87e7d4 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjPipeliningCompilerAdapter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjPipeliningCompilerAdapter.java @@ -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++) {