Skip to content

Eliminate java.lang annotations from AnnotatedTypeMetadata #22885

Closed
@philwebb

Description

@philwebb

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

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: taskA general task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions