Community
Participate
Working Groups
Given a type such as : private static class NamedPointcutResolution { @Pointcut("execution(* *(..))") public void a() {} @Pointcut("this(org.aspectj.weaver.tools.Java15PointcutExpressionTest.A)") public void b() {} @Pointcut("a() && b()") public void c() {} } The reflection based delegate is unable to resolve the pointcut c() failing with either (1) an NPE, or (2) a StackOverflow, depending on the order of the pointcut definitions in the type. The problem occurs because in resolving "c()" we get all the pointcuts in the type, which gets a(), b(), and c(), and tries to resolve them...
To solve this I had to split the getDeclaredPointcuts operation in Java15ReflectionBasedDelegate into 3 distinct phases: first populate the pointcuts array with DeferredResolvedPointcutDefinitions :- these know there name and parameters, but not yet the Pointcut object they contain. secondly resolve all the pointcuts thirdly concretize all the pointcuts Driving through these phases in this order (as oppose to trying to resolve and concretize the first pointcut before the others have even been defined) prevents the errors described.
.. this is a high priority bug for the Spring community
fix committed in tree.
fix available
Changing OS from Mac OS to Mac OS X as per bug 185991