Project: AspectJ
Bug 154332 [annotations] Incorrect handling of java.lang annotations when matching
Reported: 2006-08-18 03:49:03 | Status: resolved fixed

As raised by Mr Bodkin on the list: Can anyone tell me why this compiling this program produces warnings for marker but not for deprecated (in a recent dev build of AJDT)? Is this just a bug? Both have runtime retention, so I would expect equivalent behavior. @Deprecated @Marker public aspect Annot { pointcut test() : within(@Marker *);// *); declare warning: staticinitialization(@Deprecated *): "deprecated"; declare warning: staticinitialization(@Marker *): "marker"; public static void main(String argz[]) { new Baz().foo(); } } @Deprecated @Marker class Baz { public void foo() {} } @Retention(RetentionPolicy.RUNTIME) public @interface Marker { }

Files changed in fix:
tests/bugs153/pr154332/Annot.java tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java