-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b113
-
Not verified
Calls to annotate.flush() in MemberEnter and ClassReader cause TypeAnnotationPosition to visit some tree nodes before they have been visited by memberEnter. TypeAnnotationPosition handles this case by failing silently, which ultimately cause the annotations it attempts to attach to be incorrectly placed in Runtime[In]VisibleAnnotations attributes as opposed to Runtime[In]VisibleTypeAnnotations.
Type annotation code needs to be refactored in the following ways:
1) The silent failures need to be replaced by exceptions. This is a failure condition; it should not simply fail silently.
2) The code needs to be redesigned to ensure that TypeAnnotationPosition cannot visit a tree node until it has been visited by memberEnter.
3) Better tests need to be developed.
Type annotation code needs to be refactored in the following ways:
1) The silent failures need to be replaced by exceptions. This is a failure condition; it should not simply fail silently.
2) The code needs to be redesigned to ensure that TypeAnnotationPosition cannot visit a tree node until it has been visited by memberEnter.
3) Better tests need to be developed.
- relates to
-
JDK-8026286 Improper locking of annotation queues causes assertion failures.
-
- Closed
-