Skip to content

Skip processing of Java annotations in QualifierAnnotationAutowireCandidateResolver #33580

Closed
@sbrannen

Description

QualifierAnnotationAutowireCandidateResolver.checkQualifiers() currently checks if Java annotations are qualifier annotations, and it also checks if Java meta-annotations (for example, annotations in the java.lang.annotation package such as @Retention) are qualifier annotations.

Since such annotations can never be candidates for qualifier annotations, we should preemptively skip processing of Java annotations in QualifierAnnotationAutowireCandidateResolver.

For example, we could make use of something similar to AnnotationsScanner.hasPlainJavaAnnotationsOnly(...) to determine if processing is necessary, or we could just exclude any annotation whose package name starts with java. or javax..

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions