Community
Participate
Working Groups
I get this error: C:\temp\ajcSandbox\ajcTest27856.tmp\TestEmptyPointcutAtAspect.java:8:0::0 Method annotated with @Pointcut() for abstract pointcut must be abstract when compiling this aspect with ajc (it's fine with javac): @Aspect public class TestEmptyPointcutAtAspect { @Pointcut("") protected void scope () {} }
Created attachment 33703 [details] Testcase (combined with 125480)
I presume you are trying to define an empty (matches nothing but overridable) scope pointcut rather than an abstract scope pointcut?
The testcase tries to implement an inherited abstract pointcut defined in a parent code-style aspect.
Another way to express this is of course: @Pointcut protected void scope () {} which doesnt work either. I see in the patch several files duplicated in a tests/ltw directory that are also in the tests/bugs151/pr125480 directory. I'm ignoring the ones in the tests/ltw directory - they don't seem to be referenced from the test XML. I'm assuming they are just leftover after moving the code to the bugs folder. The basic problem here seems to be @AJ doesnt understand empty matches nothing pointcut expressions. I've rectified this - it isn't as clean as it could be but it works ok (the tests for 125475 and 125480 work for me).
fix available.