diff options
author | aclement <aclement> | 2005-01-27 17:27:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-01-27 17:27:57 +0000 |
commit | b2714f437b60f303cf445649cf86a3008000ffdd (patch) | |
tree | 7d2d4ae90fbe009e33a3af74680f0def8fdcc2c3 | |
parent | 2aeab8210db82a9610a17fc9aeeb47a3ee70897e (diff) | |
download | aspectj-b2714f437b60f303cf445649cf86a3008000ffdd.tar.gz aspectj-b2714f437b60f303cf445649cf86a3008000ffdd.zip |
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.
-rw-r--r-- | weaver/src/org/aspectj/weaver/PerTypeWithinTargetTypeMunger.java | 4 |
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) { |