diff options
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java index 3b317cbf7..74deb96b1 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/WildAnnotationTypePattern.java @@ -58,9 +58,11 @@ public class WildAnnotationTypePattern extends AnnotationTypePattern { // matches if the type of any of the annotations on the AnnotatedElement is // matched by the typePattern. ResolvedType[] annTypes = annotated.getAnnotationTypes(); - for (int i = 0; i < annTypes.length; i++) { - if (typePattern.matches(annTypes[i],TypePattern.STATIC).alwaysTrue()) { - return FuzzyBoolean.YES; + if (annTypes.length!=0) { + for (int i = 0; i < annTypes.length; i++) { + if (typePattern.matches(annTypes[i],TypePattern.STATIC).alwaysTrue()) { + return FuzzyBoolean.YES; + } } } return FuzzyBoolean.NO; |