summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoravasseur <avasseur>2005-09-29 14:29:43 +0000
committeravasseur <avasseur>2005-09-29 14:29:43 +0000
commit8a34d98b678b9d85657d81b8991928b8b2788d05 (patch)
tree7b067cd5d25036a46a909b7bac4fc146e7b0db0c /weaver
parentd6256b8c3c944d8fa2feb6d837900144db6521ac (diff)
downloadaspectj-8a34d98b678b9d85657d81b8991928b8b2788d05.tar.gz
aspectj-8a34d98b678b9d85657d81b8991928b8b2788d05.zip
#108488 @AspectJ perthis(..) was broken for some pointcut issue
checks for @AfterXX fixed
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java3
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java3
3 files changed, 5 insertions, 3 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java b/weaver/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java
index 4cbc88248..42f1b2d4e 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java
@@ -137,7 +137,8 @@ public class PerThisOrTargetPointcutVisitor extends IdentityPointcutVisitor {
//pertarget(target(Foo)) => Foo+ for type pattern matching
//perthis(this(Foo)) => Foo+ for type pattern matching
// TODO AV - we do like a deep copy by parsing it again.. quite dirty, would need a clean deep copy
- TypePattern copy = new PatternParser(node.getType().toString()).parseTypePattern();
+ TypePattern copy = new PatternParser(node.getType().toString().replace('$', '.')).parseTypePattern();
+ // TODO AV - see dirty replace from $ to . here as inner classes are with $ instead (#108488)
copy.includeSubtypes = true;
return copy;
} else {
diff --git a/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
index f962cf4aa..7eb8ad276 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
@@ -93,7 +93,7 @@ public class ThisOrTargetPointcut extends NameBindingPointcut {
UnresolvedType typeToMatch = isThis ? shadow.getThisType() : shadow.getTargetType();
//if (typeToMatch == ResolvedType.MISSING) return FuzzyBoolean.NO;
- return type.matches(typeToMatch.resolve(shadow.getIWorld()), TypePattern.DYNAMIC);
+ return type.matches(typeToMatch.resolve(shadow.getIWorld()), TypePattern.DYNAMIC);//AVPT was DYNAMIC
}
public void write(DataOutputStream s) throws IOException {
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
index 34363d39b..2cea93d52 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
@@ -447,7 +447,8 @@ public class WildTypePattern extends TypePattern {
*/
public FuzzyBoolean matchesInstanceof(ResolvedType type) {
//XXX hack to let unmatched types just silently remain so
- if (maybeGetSimpleName() != null) return FuzzyBoolean.NO;
+ if (maybeGetSimpleName() != null) return
+ FuzzyBoolean.NO;
type.getWorld().getMessageHandler().handleMessage(
new Message("can't do instanceof matching on patterns with wildcards",