]> source.dussan.org Git - aspectj.git/commitdiff
add extra guard in runtime matching of args.
authoracolyer <acolyer>
Thu, 1 Sep 2005 09:20:17 +0000 (09:20 +0000)
committeracolyer <acolyer>
Thu, 1 Sep 2005 09:20:17 +0000 (09:20 +0000)
weaver/src/org/aspectj/weaver/patterns/TypePatternList.java

index 5f8ceab026e03ec08e6f25c1ebd6e8fa78d8f830..de106c4d514b46b359ea5ce6122cbb63e01aaf05 100644 (file)
@@ -101,6 +101,10 @@ public class TypePatternList extends PatternNode {
                        } else if (typePatterns[i] == TypePattern.ANY) {
                                argsIndex++;
                        } else {
+                               // be defensive, might see a type-pattern NO
+                               if (! (typePatterns[i] instanceof ExactTypePattern)) {
+                                       return FuzzyBoolean.NO;
+                               }
                                // match the argument type at argsIndex with the ExactTypePattern
                                // we it is exact because nothing else is allowed in args
                                ExactTypePattern tp = (ExactTypePattern)typePatterns[i];