Community
Participate
Working Groups
BETA_JAVA7, follow-up to bug 353093 comment 4 The patch in that bug smelled like there could be other opportunities where TagBits.AnnotationSafeVarargs and TagBits.AnnotationPolymorphicSignature should be used. So I went and opened a call hierarchy on AnnotationSuppressWarnings, AnnotationSafeVarargs, and AnnotationPolymorphicSignature (select the fields in the Outline view). Already the first reference to AnnotationSuppressWarnings in BinaryIndexer#addBinaryStandardAnnotations(long) looked suspicious -- and indeed the search engine doesn't find references to SafeVarargs and PolymorphicSignature. Fix is to add this and count up the index version: if ((annotationTagBits & TagBits.AnnotationSafeVarargs) != 0) { char[][] compoundName = TypeConstants.JAVA_LANG_SAFEVARARGS; addAnnotationTypeReference(compoundName[compoundName.length-1]); } if ((annotationTagBits & TagBits.AnnotationPolymorphicSignature) != 0) { char[][] compoundName = TypeConstants.JAVA_LANG_INVOKE_METHODHANDLE_$_POLYMORPHICSIGNATURE; addAnnotationTypeReference(compoundName[compoundName.length-1]); } Please also check the other references to AnnotationSuppressWarnings or the other standard annotations and make sure the new 1.7 annotations are handled properly in all places where the old standard annotations are already handled.
Created attachment 200382 [details] Proposed fix
Created attachment 200385 [details] Proposed fix + regression test With a regression test for indexing SafeVarargs reference.
Satyam, please verify.
Released in BETA_JAVA7 branch only.
changes are good.
Verified for 3.8M1 using build I20110729-1200