]> source.dussan.org Git - aspectj.git/commitdiff
228980: tests and partial fix
authoraclement <aclement>
Sat, 26 Apr 2008 05:11:25 +0000 (05:11 +0000)
committeraclement <aclement>
Sat, 26 Apr 2008 05:11:25 +0000 (05:11 +0000)
weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java
weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java

index 99ff2c3520e6ef84a95d0a0e1d2b90fd238fd93f..859e8316fe2005b58ac1bc460b2dee2299f16bd0 100644 (file)
@@ -106,7 +106,12 @@ public class ExactTypePattern extends TypePattern {
                        typeMatch = matchesTypeVariable((TypeVariableReferenceType)matchType);
                }
                annotationPattern.resolve(matchType.getWorld());
-               boolean annMatch = this.annotationPattern.matches(matchType).alwaysTrue();
+               boolean annMatch = false;
+        if (matchType.temporaryAnnotationTypes!=null) {
+            annMatch = annotationPattern.matches(matchType,matchType.temporaryAnnotationTypes).alwaysTrue();
+        } else {
+            annMatch = annotationPattern.matches(matchType).alwaysTrue();
+        }
                return (typeMatch && annMatch);
        }
        
@@ -125,7 +130,12 @@ public class ExactTypePattern extends TypePattern {
                        typeMatch = matchesTypeVariable((TypeVariableReferenceType)matchType);
                }
                annotationPattern.resolve(matchType.getWorld());
-               boolean annMatch = this.annotationPattern.matches(annotatedType).alwaysTrue();
+        boolean annMatch = false;
+        if (annotatedType.temporaryAnnotationTypes!=null) {
+            annMatch = annotationPattern.matches(annotatedType,annotatedType.temporaryAnnotationTypes).alwaysTrue();
+        } else {
+            annMatch = annotationPattern.matches(annotatedType).alwaysTrue();
+        }
                return (typeMatch && annMatch);         
        }
        
index 061e8b65239a162d77d4abdf5d6ce721a9679533..813925d243dceeecef8e4dccfe56dc4fe21e02ff 100644 (file)
@@ -402,7 +402,7 @@ public class SignaturePattern extends PatternNode {
                if (parameterAnnotationTypes==null || parameterAnnotationTypes.length==0) parameterAnnotationTypes=null;
                if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC,parameterAnnotationTypes).alwaysTrue()) {
                        // It could still be a match based on the generic sig parameter types of a parameterized type
-                       if (!parameterTypes.matches(world.resolve(aMethod.getGenericParameterTypes()),TypePattern.STATIC).alwaysTrue()) {
+                       if (!parameterTypes.matches(world.resolve(aMethod.getGenericParameterTypes()),TypePattern.STATIC,parameterAnnotationTypes).alwaysTrue()) {
                                return FuzzyBoolean.MAYBE;
                                // It could STILL be a match based on the erasure of the parameter types??
                                // to be determined via test cases...