diff options
author | aclement <aclement> | 2006-09-14 14:52:25 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-09-14 14:52:25 +0000 |
commit | 563711fb8fd867a89b0ffb18d68105ee35a34625 (patch) | |
tree | 8ac71f5fd747c2428216dec64876fd354d40604b | |
parent | 359ef5055a0cfa1f16bf7e0de8d4a001dcdda542 (diff) | |
download | aspectj-563711fb8fd867a89b0ffb18d68105ee35a34625.tar.gz aspectj-563711fb8fd867a89b0ffb18d68105ee35a34625.zip |
found whilst investigating 157057 - we sometimes crashed for bad input (duplicate class declarations) rather than just putting out a nice message.
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/AjPipeliningCompilerAdapter.java | 2 |
1 files changed, 2 insertions, 0 deletions
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++) { |