Closed GoogleCodeExporter closed 9 years ago
Just to add some detail to this. The reason this issue occurs is as follows:
1) We fixed a bug that was keeping us from writing annotations into the
elements of extends/implements clauses.
2) We then started to insert annotations on the extends/implements clauses.
3) AnnotatedTypeFactory.fromMember, when called on FIELDS, PARAMETERS, and
LOCAL_VARIABLES, calls inheritAnnotationsFromClass, which adds annotations from
the type representing the declaration of the class to the type currently being
annotated.
It does so by calling fromElement(classElement) which, because we started
inserting annotations on the element's extends/implements, now has the default
annotations in hierarchy.
4) We pull the annotations off the extends/implements clauses and place them on
the FIELD, PARAMETER, or LOCAL_VARIABLE before the normal. This happens before
defaulting so we never apply the defaulting rules. The extends/implements
clauses usually have a default of DefaultQualifierInHierarchy, so we
effectively have 1 default for all of the above locations.
I once again disabled the writing of extends/implements annotations into
elements.
Original comment by Jonathan...@gmail.com
on 19 Mar 2015 at 7:25
Original issue reported on code.google.com by
michael.ernst@gmail.com
on 19 Mar 2015 at 2:47Attachments: