summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-01 12:38:05 +0000
committeracolyer <acolyer>2005-09-01 12:38:05 +0000
commit558e025362a02c1c5f88008b3f0c1e90adec60a8 (patch)
tree3a555ba85fe8a528569b27495d41aecfd4a241a7 /weaver
parentb79814ee09ddda6b8b48b9f98a39c431f1368790 (diff)
downloadaspectj-558e025362a02c1c5f88008b3f0c1e90adec60a8.tar.gz
aspectj-558e025362a02c1c5f88008b3f0c1e90adec60a8.zip
don't match against synthetic constructor args
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java b/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
index 2fd1eb7b6..33bcb26fc 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
@@ -107,6 +107,14 @@ public class ArgsPointcut extends NameBindingPointcut {
System.arraycopy(argumentsToMatchAgainst, 0, argsSubset, 0, newArgLength);
argumentsToMatchAgainst = argsSubset;
}
+ } else if (shadow.getKind() == Shadow.ConstructorExecution) {
+ if (shadow.getMatchingSignature().getParameterTypes().length < argumentsToMatchAgainst.length) {
+ // there are one or more synthetic args on the end, caused by non-public itd constructor
+ int newArgLength = shadow.getMatchingSignature().getParameterTypes().length;
+ ResolvedType[] argsSubset = new ResolvedType[newArgLength];
+ System.arraycopy(argumentsToMatchAgainst, 0, argsSubset, 0, newArgLength);
+ argumentsToMatchAgainst = argsSubset;
+ }
}
return argumentsToMatchAgainst;