From 38ae6e91f8272851bd0404753a9804e466faaffa Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 1 Feb 2005 18:02:12 +0000 Subject: [PATCH] Fix NPE if attempting annotation usage on 1.4 rt.jar ! --- .../ajdt/internal/compiler/lookup/EclipseSourceType.java | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.5