From 3299a01318c8dfd360f5b970708f261a64bf49e7 Mon Sep 17 00:00:00 2001 From: acolyer Date: Mon, 11 Jul 2005 13:49:26 +0000 Subject: [PATCH] a simple type pattern for a generic type should match any parameterization of that type --- .../src/org/aspectj/weaver/patterns/ExactTypePattern.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java index 5703251a8..54a61825f 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java @@ -96,6 +96,9 @@ public class ExactTypePattern extends TypePattern { protected boolean matchesExactly(ResolvedTypeX matchType) { boolean typeMatch = this.type.equals(matchType); + if (!typeMatch && (matchType.isParameterized() || matchType.isGeneric())) { + typeMatch = this.type.equals(matchType.getRawType()); + } annotationPattern.resolve(matchType.getWorld()); boolean annMatch = this.annotationPattern.matches(matchType).alwaysTrue(); return (typeMatch && annMatch); @@ -103,6 +106,9 @@ public class ExactTypePattern extends TypePattern { protected boolean matchesExactly(ResolvedTypeX matchType, ResolvedTypeX annotatedType) { boolean typeMatch = this.type.equals(matchType); + if (!typeMatch && (matchType.isParameterized() || matchType.isGeneric())) { + typeMatch = this.type.equals(matchType.getRawType()); + } annotationPattern.resolve(matchType.getWorld()); boolean annMatch = this.annotationPattern.matches(annotatedType).alwaysTrue(); return (typeMatch && annMatch); -- 2.39.5