Community
Participate
Working Groups
AJDT: 1.5.0.200612220629 AJ: 1.5.3.200612081116 Unlike @Before() etc., there is no error issued for including a @DeclareParents inside a class without an @Aspect annotation. For example, the following code compiles just fine with 'ajc' (through AJDT): // Note no @Aspect public class AnAspect { @DeclareParents("test.*") public java.io.Serializable s; } Of course, while it compiles fine, there is no effect of such statement and that can lead to surprises (for example, I kept rechecking my type pattern).
fixes and test committed, new error is: "DeclareParents can only be used inside an aspect type" Interestingly you get a hideous error in the case of code style aspects if you specify declare parents inside a non-aspect, but that needs grammar changes to fix.