From 97cd71ae811def2ee79d34567f60acb9f76ebf0c Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 31 May 2006 17:32:36 +0000 Subject: test and fix for pr144717 - array type as pointcut parameter in reflective world --- weaver/src/org/aspectj/weaver/tools/PointcutParser.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'weaver') 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: -- cgit v1.2.3