Closed
Description
Currently AnnotatedTypeMetadata
has some fairly inconsistent rules around java.lang
annotations.
With StandardAnnotationMetadata
for example hasAnnotation
will support java.lang
annotations, where as isAnnotated
delegates AnnotatedElementUtils
which will filter them.
The ASM AnnotationMetadataReadingVisitor
class provides parity by using AnnotationUtils.isInJavaLangAnnotationPackage(annotationName)
for isAnnotated
.
Some work on removing the overhead of java.lang
processing was implemented in #17580 but I think we can go further and simply always filter java.lang annotations. Doing this will also help simplify the implementation for #22884