aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--weaver/src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java b/weaver/src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java
index 6f81df592..55a9d4b48 100644
--- a/weaver/src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java
+++ b/weaver/src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java
@@ -47,8 +47,10 @@ public class PerTypeWithinTargetTypeMunger extends ResolvedTypeMunger {
// This is a lexical within() so if you say PerTypeWithin(Test) and matchType is an
// inner type (e.g. Test$NestedType) then it should match successfully
+ // Does not match if the target is an interface
public boolean matches(ResolvedTypeX matchType, ResolvedTypeX aspectType) {
- return isWithinType(matchType).alwaysTrue();
+ return isWithinType(matchType).alwaysTrue() &&
+ !matchType.isInterface();
}
private FuzzyBoolean isWithinType(ResolvedTypeX type) {