Following up on #16100, AnnotationUtils.findAnnotation has another quirk that needs to be fixed: Locally declared composed annotations need to be favored over annotations declared on interfaces. The current behavior, fortunately unlikely to be ever hit in practice, is conceptually and intuitively wrong. And if fixed, the lookup can be implemented more efficiently overall.
Affects: 4.1 GA
#16100 Favor more locally declared composed annotations over inherited annotations in AnnotationUtils
#16930 AnnotationUtils provides poor diagnostics if getDeclaredAnnotations throws an exception