Avoid repeated assignability check for raw class on fallback match, since AutowireCandidateResolver is only being called for basic type matches to begin with
Issue: SPR-9965
This commit is contained in:
parent
874a2a9ca2
commit
f27304d785
|
|
@ -106,12 +106,10 @@ public class GenericTypeAwareAutowireCandidateResolver implements AutowireCandid
|
|||
}
|
||||
}
|
||||
}
|
||||
if (targetType == null) {
|
||||
if (targetType == null || (descriptor.fallbackMatchAllowed() && targetType.hasUnresolvableGenerics())) {
|
||||
return true;
|
||||
}
|
||||
if (descriptor.fallbackMatchAllowed() && targetType.hasUnresolvableGenerics()) {
|
||||
return descriptor.getDependencyType().isAssignableFrom(targetType.getRawClass());
|
||||
}
|
||||
// Full check for complex generic type match...
|
||||
return dependencyType.isAssignableFrom(targetType);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue