Community
Participate
Working Groups
I20060118-0800, jdk1.5.0_06 Search for references to java.lang.annotation.ElementType or one of its members in a 1.5 JRE does not find any match. But most of the annotation declarations in the JDK use an @Target with an ElementType, e.g. ... @Target(ElementType.ANNOTATION_TYPE) public @interface Retention ... ... @Target(ElementType.ANNOTATION_TYPE) public @interface Target ... I would understand that references with RetentionPolicy.SOURCE are not found, but the others should be available.
Created attachment 33754 [details] Patch to fix this issue Additional information about annotations in class files were not used by BinaryIndexer => record in index files reference to annotation itself, type names and enum constant names of member pair values...
Olivier, can you review if the parse of the class file annotations information is correct? Thx
Created attachment 34062 [details] New patch to fix this issue Olivier, may you review this new fix? I'll attach jar file for tests separately... Thanks
Created attachment 34063 [details] Jar file for model tests
Released in HEAD.
Created attachment 34763 [details] Additional patch to index standard annotations contents Unfortunately previous fix only index references inside non-standard annotations and so Search Engine was still not able to find correct reference to ElementType inside standard annotations as Retention... Standard annotations are stored in tagBits field of ClassFileReader, so now BinaryIndex indexes corresponding types and fields reading bits of this field.
Verified for 3.2 M5 using build I20060215-0800 There is still some issue in the same area (bug 128033)