]> source.dussan.org Git - aspectj.git/commitdiff
dont crash if other problems prevent annotation resolution
authoraclement <aclement>
Wed, 1 Oct 2008 18:39:33 +0000 (18:39 +0000)
committeraclement <aclement>
Wed, 1 Oct 2008 18:39:33 +0000 (18:39 +0000)
weaver/src/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java

index 66f36a2297f04332e5ab452c28f245defe3e6296..0263035eb23aa3f5946201578b9cf267d44e54a9 100644 (file)
@@ -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);