From b2714f437b60f303cf445649cf86a3008000ffdd Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 27 Jan 2005 17:27:57 +0000 Subject: [PATCH] Fix for Bug 83645: pertypewithin({interface}) illegal field modifier - Don't let the munger that adds the ptw field and methods match on an interface. --- .../src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.39.5