Document that AnnotationSupport.isAnnotated()
does not find repeatable annotations
#4058
Milestone
AnnotationSupport.isAnnotated()
does not find repeatable annotations
#4058
Overview
The regression reported in #4054 was likely caused by confusion about the semantics of
AnnotationSupport.isAnnotated()
.Although one might assume that
isAnnotated()
would returntrue
if the given annotation type is present as a repeatable annotation, it does not actually find repeatable annotations.Instead, one must use one of the
findRepeatableAnnotations()
variants and check if the returned list is not empty to reliably determine if an element is annotated with a repeatable annotation.Related Issues
@ExtendWith
meta-annotations on fields no longer supported in 5.11.x #4054Deliverables
AnnotationSupport.isAnnotated()
variants to reflect this.AnnotationSupport
to reflect this, if applicable.AnnotatedElementContext.isAnnotated()
to reflect this.The text was updated successfully, but these errors were encountered: