summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-01 09:20:17 +0000
committeracolyer <acolyer>2005-09-01 09:20:17 +0000
commit72ba3c51b1e16f6f6a09197791fa39427d22379f (patch)
tree9ec4d6de1330f39682a5fd53262d9b02b8927089
parenta66e0a2aa8a6cb057f4b0d740ad961fb1ede5e85 (diff)
downloadaspectj-72ba3c51b1e16f6f6a09197791fa39427d22379f.tar.gz
aspectj-72ba3c51b1e16f6f6a09197791fa39427d22379f.zip
add extra guard in runtime matching of args.
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/TypePatternList.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/TypePatternList.java b/weaver/src/org/aspectj/weaver/patterns/TypePatternList.java
index 5f8ceab02..de106c4d5 100644
--- a/weaver/src/org/aspectj/weaver/patterns/TypePatternList.java
+++ b/weaver/src/org/aspectj/weaver/patterns/TypePatternList.java
@@ -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];