diff options
author | acolyer <acolyer> | 2006-05-31 17:32:36 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2006-05-31 17:32:36 +0000 |
commit | 97cd71ae811def2ee79d34567f60acb9f76ebf0c (patch) | |
tree | e984f23113da43804c3a514473472d5a7d346e5e /weaver | |
parent | d072fd16eccdca9df642585297804902f68e16cc (diff) | |
download | aspectj-97cd71ae811def2ee79d34567f60acb9f76ebf0c.tar.gz aspectj-97cd71ae811def2ee79d34567f60acb9f76ebf0c.zip |
test and fix for pr144717 - array type as pointcut parameter in reflective world
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/tools/PointcutParser.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/tools/PointcutParser.java b/weaver/src/org/aspectj/weaver/tools/PointcutParser.java index ef2050dfb..e30b59bce 100644 --- a/weaver/src/org/aspectj/weaver/tools/PointcutParser.java +++ b/weaver/src/org/aspectj/weaver/tools/PointcutParser.java @@ -390,7 +390,7 @@ public class PointcutParser { if (formalParameters == null) formalParameters = new PointcutParameter[0]; FormalBinding[] formalBindings = new FormalBinding[formalParameters.length]; for (int i = 0; i < formalBindings.length; i++) { - formalBindings[i] = new FormalBinding(UnresolvedType.forName(formalParameters[i].getType().getName()),formalParameters[i].getName(),i); + formalBindings[i] = new FormalBinding(toUnresolvedType(formalParameters[i].getType()),formalParameters[i].getName(),i); } if (inScope == null) { return new SimpleScope(getWorld(),formalBindings); @@ -412,6 +412,14 @@ public class PointcutParser { } } + private UnresolvedType toUnresolvedType(Class clazz) { + if (clazz.isArray()) { + return UnresolvedType.forSignature(clazz.getName().replace('.','/')); + } else { + return UnresolvedType.forName(clazz.getName()); + } + } + private void validateAgainstSupportedPrimitives(Pointcut pc, String expression) { switch(pc.getPointcutKind()) { case Pointcut.AND: |