From 563711fb8fd867a89b0ffb18d68105ee35a34625 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 14 Sep 2006 14:52:25 +0000 Subject: [PATCH] found whilst investigating 157057 - we sometimes crashed for bad input (duplicate class declarations) rather than just putting out a nice message. --- .../ajdt/internal/compiler/AjPipeliningCompilerAdapter.java | 2 ++ 1 file changed, 2 insertions(+) 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++) { -- 2.39.5