Community
Participate
Working Groups
In head of BETA_JAVA8 I see 38 regressions (9 in NullAnnotationTest times 4 compliance levels + 2 in AnnotationDependencyTests). Contrary to my first impression this is not necessarily caused by bug 391331 but a simple bug in Annotation.isRuntimeInvisible(). Fix to follow shortly.
Mh, maybe this is a redish herring, the regression occurred only because in my workspace I had changed @NonNull by adding Target TYPE_USE. Reverting this change fixed the tests. Still this snippet in Annotation.isRuntimeInvisible() looks fishy to me: if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) != 0) { return false; } If an annotation can be used as either SE7 or type annotation it will no longer be written to class files, currently. May initial guess was we should change to if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) != 0) { return false; } Which fixed most regressions but cause new problems elsewhere :( Not sure, what will be the result once type annotations are written. Reducing severity and removing the block regarding 392099 but leaving it open for now for comments.
(In reply to comment #1) > If an annotation can be used as either SE7 or type annotation it will no > longer be written to class files, currently. This is a bug. > May initial guess was we should change to > > if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) != 0) { > return false; > } It should actually be: // we need to filter out only "pure" type use and type parameter annotations, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119 if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) != 0) { if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0) { // not a hybrid target. return false; } } Fix and tests will follow shortly. Thanks for catching this Stephan. > Which fixed most regressions but cause new problems elsewhere :( > > Not sure, what will be the result once type annotations are written. > > Reducing severity and removing the block regarding 392099 but leaving it > open for now for comments.
Fix and tests released via: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=53b05c23cf839b3cc88e44aaf71a3bc8827a1b42