Polishing

This commit is contained in:
Juergen Hoeller
2024-02-20 15:42:15 +01:00
parent 85c9279431
commit 93f0ec2fa1
3 changed files with 13 additions and 12 deletions

View File

@@ -282,7 +282,7 @@ public class QualifierAnnotationAutowireCandidateResolver extends GenericTypeAwa
}
if (actualValue == null && attributeName.equals(AutowireCandidateQualifier.VALUE_KEY) &&
expectedValue instanceof String name && bdHolder.matchesName(name)) {
// Fall back on bean name (or alias) match
// Finally, check bean name (or alias) match
continue;
}
if (actualValue == null && qualifier != null) {
@@ -333,8 +333,8 @@ public class QualifierAnnotationAutowireCandidateResolver extends GenericTypeAwa
*/
@Override
public boolean hasQualifier(DependencyDescriptor descriptor) {
for (Annotation ann : descriptor.getAnnotations()) {
if (isQualifier(ann.annotationType())) {
for (Annotation annotation : descriptor.getAnnotations()) {
if (isQualifier(annotation.annotationType())) {
return true;
}
}