Community
Participate
Working Groups
Try to compile this (causes NullPointerException with ajc 1.1.1): public class SampleClass { public static void main(String[] args) { System.out.println("Hello"); } } aspect SampleAspect { declare warning : args(int) : "Watch out!"; public void SampleClass.aMethod(int x) {} }
This appears to be related to the NPE in bug 51320 caused when a context based pointcut is used in a declare error / warning statement.
Fixed in 51320, the test program (if entirely captured in a file SampleClass.java) now compiles with: C:\Eclipse\212\eclipse\aspectj_ws\tests\bugs>ajc SampleClass.java C:\Eclipse\212\eclipse\aspectj_ws\tests\bugs\SampleClass.java:8 args() pointcut designator cannot be used in declare statement 1 error