Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip processing of Java annotations in QualifierAnnotationAutowireCandidateResolver #33580

Closed
sbrannen opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

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..

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Sep 23, 2024
@sbrannen sbrannen added this to the 6.2.0-RC2 milestone Sep 23, 2024
@sbrannen sbrannen self-assigned this Sep 23, 2024
@jhoeller jhoeller modified the milestones: 6.2.0-RC2, 6.2.x Oct 14, 2024
@jhoeller jhoeller assigned jhoeller and unassigned sbrannen Oct 16, 2024
@jhoeller jhoeller modified the milestones: 6.2.x, 6.1.14 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants