Community
Participate
Working Groups
The compiler currently can't cope with annotation types originating in class files. So you can't define an annotation and refer to @Inherited/@Retention/etc. You also can't build your own annotation with javac and then refer to it in source you pass to ajc as that is the same issue - the annotation you are referring to will originate from a class file. The problem is the compiler attempting resolution when a scope is null. It appears to be related to our modifying of BinaryTypeBinding to subclass SourceTypeBinding - this causes the compiler (in various places) to call getAnnotationBits() (which does the resolution) on BinaryTypeBindings because they extend SourceTypeBinding. I *think* in the case of a binary type binding they are always already resolved - and so the solution is one line in BinaryTypeBinding ctor to ensure the tagbits is marked appropriately as annotation resolved - so we don't attempt it later. This stab at a fix passes the tests and passes my tiny testcase for the problem - it needs a ton more testing - but I will check it in so people on the lists can try it. First go at this fix will be a direct hack on jdtcore rather than a change in shadows and a rebuild of jdtcore as I don't have the bandwidth from where I am to do all that - I will do things properly on Monday depending on peoples findings with this small hack...
Fix checked in - initial hack tested by Pepe from the lasts as working ok. Waiting for build before closing.
confirmed fixed in AspectJ and new AJDT builds.
oops, forgot to also change its state to fixed when added last comment !