diff options
Diffstat (limited to 'weaver5')
-rw-r--r-- | weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java | 2 | ||||
-rw-r--r-- | weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java index 08044ea5b..b6156fc5c 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java @@ -257,7 +257,7 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends AjType<?>[] ptypes = pcs[i].getParameterTypes(); UnresolvedType[] weaverPTypes = new UnresolvedType[ptypes.length]; for (int j = 0; j < weaverPTypes.length; j++) { - weaverPTypes[j] = UnresolvedType.forName(ptypes[j].getName()); + weaverPTypes[j] = this.typeConverter.fromType(ptypes[j].getJavaClass()) ; } pointcuts[i] = new DeferredResolvedPointcutDefinition(getResolvedTypeX(),pcs[i].getModifiers(),pcs[i].getName(),weaverPTypes); } diff --git a/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java b/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java index 6e05580b9..4a0ecb28a 100644 --- a/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java +++ b/weaver5/java5-testsrc/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java @@ -14,6 +14,7 @@ package org.aspectj.weaver.tools; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Method; +import java.util.Date; import java.util.List; import org.aspectj.lang.annotation.Pointcut; @@ -299,6 +300,14 @@ public class Java15PointcutExpressionTest extends TestCase { assertTrue("does not match",sm.neverMatches()); } + public void testArrayTypeInArgs() throws Exception { + PointcutParameter[] params = new PointcutParameter[3]; + params[0] = parser.createPointcutParameter("d", Date.class); + params[1] = parser.createPointcutParameter("s", String.class); + params[2] = parser.createPointcutParameter("ss", String[].class); + PointcutExpression ex = parser.parsePointcutExpression("org.aspectj.weaver.tools.Java15PointcutExpressionTest.UsesArrays.pc(d,s,ss)",UsesArrays.class,params); + } + protected void setUp() throws Exception { super.setUp(); parser = PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingSpecifiedClassloaderForResolution(this.getClass().getClassLoader()); @@ -370,6 +379,13 @@ public class Java15PointcutExpressionTest extends TestCase { public void d() {} } + + private static class UsesArrays { + + @Pointcut("execution(* *(..)) && args(d,s,ss)") + public void pc(Date d, String s, String[] ss) {} + + } } |