Restored isTypeMatch null behavior and refined typeToMatch parameter name
Issue: SPR-12147
This commit is contained in:
@@ -1025,15 +1025,15 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTypeMatch(String name, ResolvableType targetType) throws NoSuchBeanDefinitionException {
|
||||
public boolean isTypeMatch(String name, ResolvableType typeToMatch) throws NoSuchBeanDefinitionException {
|
||||
assertBeanFactoryActive();
|
||||
return getBeanFactory().isTypeMatch(name, targetType);
|
||||
return getBeanFactory().isTypeMatch(name, typeToMatch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTypeMatch(String name, Class<?> targetType) throws NoSuchBeanDefinitionException {
|
||||
public boolean isTypeMatch(String name, Class<?> typeToMatch) throws NoSuchBeanDefinitionException {
|
||||
assertBeanFactoryActive();
|
||||
return getBeanFactory().isTypeMatch(name, targetType);
|
||||
return getBeanFactory().isTypeMatch(name, typeToMatch);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -174,15 +174,15 @@ public class SimpleJndiBeanFactory extends JndiLocatorSupport implements BeanFac
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTypeMatch(String name, ResolvableType targetType) throws NoSuchBeanDefinitionException {
|
||||
public boolean isTypeMatch(String name, ResolvableType typeToMatch) throws NoSuchBeanDefinitionException {
|
||||
Class<?> type = getType(name);
|
||||
return (targetType == null || (type != null && targetType.isAssignableFrom(type)));
|
||||
return (type != null && typeToMatch.isAssignableFrom(type));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTypeMatch(String name, Class<?> targetType) throws NoSuchBeanDefinitionException {
|
||||
public boolean isTypeMatch(String name, Class<?> typeToMatch) throws NoSuchBeanDefinitionException {
|
||||
Class<?> type = getType(name);
|
||||
return (targetType == null || (type != null && targetType.isAssignableFrom(type)));
|
||||
return (typeToMatch == null || (type != null && typeToMatch.isAssignableFrom(type)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user