From: aclement Date: Wed, 1 Oct 2008 18:39:33 +0000 (+0000) Subject: dont crash if other problems prevent annotation resolution X-Git-Tag: V1_6_2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b0234366ae48c3ac6c5f040e3d02ff553b79862b;p=aspectj.git dont crash if other problems prevent annotation resolution --- diff --git a/weaver/src/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java index 66f36a229..0263035eb 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java @@ -76,6 +76,11 @@ public class ExactAnnotationFieldTypePattern extends ExactAnnotationTypePattern cleanname = cleanname.substring(0, lastDot) + "$" + cleanname.substring(lastDot + 1); } annotationType = scope.getWorld().resolve(type, true); + if (ResolvedType.isMissing(annotationType)) { + // there are likely to be other errors around that have led to us being unable to + // resolve the annotation type, let's quit now + return this; + } } verifyIsAnnotationType((ResolvedType) annotationType, scope);