Skip processing of Java annotations in QualifierAnnotationAutowireCandidateResolver
#33580
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
QualifierAnnotationAutowireCandidateResolver.checkQualifiers()
currently checks if Java annotations are qualifier annotations, and it also checks if Java meta-annotations (for example, annotations in thejava.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 withjava.
orjavax.
.The text was updated successfully, but these errors were encountered: