Community
Participate
Working Groups
From discussion on aspectj list: Hi, Well, having just done some testing, I think this even simpler case shows within() is not behaving correctly for annotations: @Entity public class myClass1 {...} public class myClass2 {...} public aspect myAspect { before():call(* *(..)) && within(@Entity *) { } } The pointcut matches all the method calls in myClass1 and myClass2 (effectively it is parsing but then ignoring the annotation specified in the within()). So, what you want to do is valid but AspectJ is misbehaving - you get a stack overflow because the perthis() clause is also matching on your aspect type when obviously that doesnt have the annotation and shouldnt be matched. Andy. --- Andy Clement AspectJ Development Rifflard Mickaël <Mickael.Rifflard@atosorigin.com> Sent by: aspectj-users-admin@eclipse.org 22/12/2004 16:56 Please respond to aspectj-users@eclipse.org To <aspectj-users@eclipse.org> cc Subject [aspectj-users] Aspect instance on JDK 1.5 annotation Hi all, I'm currently trying to get an aspect instance for an object instance with specific JDK 1.5 annotation. Exemple : Create an aspect instance for all object like that : @Entity public class myClass { ... } I try public aspect myAspect perthis(within(@Entity *)) {...} but this aspect execution lead to a java.lang.StackOverflowError exception. Is it possible ? Thanks. Mickaël _______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org http://dev.eclipse.org/mailman/listinfo/aspectj-users
Fixed, build available: BUILD COMPLETE - build.429 Date of build: 01/11/2005 11:52:16 Time to build: 103 minutes 38 seconds Last changed: 01/11/2005 11:22:16 Latest good AspectJ jar available at: download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar