Details
Description
There seems to be an issue in the eclipse plugin with incrementally building and having annotations that are like 'SimpleNested' in class test.TestAnnotations.
To reproduce:
Using eclipse (and the plugin), in the test.reader package, create a file 'Main.java' like below:
— cut —
package test.reader;
public class Main {
public static void main(String[] args)
}
— cut —
observe that a full build succeeds.
Then, make a simple change to the file above (just white-space will do) and hit save. The above file will be flagged as failed, error message says:
Description: "'Target' cannot be resolved to a type"
Location: "line 6"
Again, from other tests I did, it looks like its only related to having annotations that are arrays composed of other annotations (like 'SimpleNested'). It appears to work correctly for all other cases.
Thanks fort any help with this. We have a large size project we're trying to use backport175 with, but we can't really use it if we have to do a full rebuild for every annotation change.
-Th
Further examination reveals that Eclipse (3.1.0RC6) doesn't grok some of the annotations that are added by AnnotationC. If a annotation is a array of other annotations or of the complex type, eclipse's class file reader produces a ArrayOutOfBounds when reading a annotated .class file.
The reason this works for a full build is that the java builder runs to completion before the anno builder, and hence the class file loader never has to deal with annotated class files. During an incremental build, the class file loader reloads all classes that are imported and fails for class files that are annotated with a array of other annotations.
-Th