aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2005-02-01 18:02:12 +0000
committeraclement <aclement>2005-02-01 18:02:12 +0000
commit38ae6e91f8272851bd0404753a9804e466faaffa (patch)
treec45c2d763dae52c4ff6bc85b37d349854e03f55e /org.aspectj.ajdt.core
parent756f85938f3e573b55fba70ee8e3e6254a7edf99 (diff)
downloadaspectj-38ae6e91f8272851bd0404753a9804e466faaffa.tar.gz
aspectj-38ae6e91f8272851bd0404753a9804e466faaffa.zip
Fix NPE if attempting annotation usage on 1.4 rt.jar !
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
index aac3ae533..2ba0dfec7 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
@@ -236,6 +236,11 @@ public class EclipseSourceType extends ResolvedTypeX.ConcreteName {
if (as == null) return false;
for (int i = 0; i < as.length; i++) {
Annotation annotation = as[i];
+ if (annotation.resolvedType == null) {
+ // Something has gone wrong - probably we have a 1.4 rt.jar around
+ // which will result in a separate error message.
+ return false;
+ }
String tname = CharOperation.charToString(annotation.resolvedType.constantPoolName());
if (TypeX.forName(tname).equals(ofType)) {
return true;