Community
Participate
Working Groups
Created attachment 207317 [details] The ajcore with the stack overflow Hi, Here are 2 aspects with the same pointcut : ##################### @Aspect public class OwnershipSecurityAspect { @DeclareError("myPcut()") public static final String securityError = "An advice already exists for setting an owner"; @Pointcut("call(public void ca..setOwner(..)) && !within(ca..OwnershipSecurityAspect) && !within(ca..*Test)") protected void myPcut() {} } ##################### @Aspect public class OwnershipSecurityAspect { @DeclareError("call(public void ca..setOwner(..)) && !within(ca..OwnershipSecurityAspect) && !within(ca..*Test)") public static final String securityError = "An advice already exists for setting an owner"; } ##################### Those are classes in my project. If i use the first one, I get a stack overflow. In fact, I get it only once. For example "mvn clean jetty:run" will produce an error the first time "jetty:run" is ran after a clean, i.e. "mvn clean" (works) --> "mvn jetty:run" (crashes) --> "mvn jetty:run" (works). However, when I use the second version, it never crashes, even after a "mvn clean". The pointcut is the same, just placed elsewhere. We use CTW. Complete ajcore is attached. Thanks, Jni
fixed, it was a circular set of calls attempting to resolve the same thing over and over because it didn't notice the type declaring the pointcut was the same as the type containing the declare.