Merge branch '1.5.x' into 2.0.x

pull/14003/head
Andy Wilkinson 6 years ago
commit daad992c96

@ -155,7 +155,10 @@ final class BeanTypeRegistry implements SmartInitializingSingleton {
} }
private void addBeanTypeForNonAliasDefinition(String name) { private void addBeanTypeForNonAliasDefinition(String name) {
addBeanTypeForNonAliasDefinition(name, getBeanDefinition(name)); RootBeanDefinition beanDefinition = getBeanDefinition(name);
if (beanDefinition != null) {
addBeanTypeForNonAliasDefinition(name, beanDefinition);
}
} }
private RootBeanDefinition getBeanDefinition(String name) { private RootBeanDefinition getBeanDefinition(String name) {
@ -215,11 +218,13 @@ final class BeanTypeRegistry implements SmartInitializingSingleton {
if (!this.beanFactory.isAlias(name) if (!this.beanFactory.isAlias(name)
&& !this.beanFactory.containsSingleton(name)) { && !this.beanFactory.containsSingleton(name)) {
RootBeanDefinition beanDefinition = getBeanDefinition(name); RootBeanDefinition beanDefinition = getBeanDefinition(name);
RootBeanDefinition existingDefinition = this.beanDefinitions.put(name, if (beanDefinition != null) {
beanDefinition); RootBeanDefinition existingDefinition = this.beanDefinitions
if (existingDefinition != null .put(name, beanDefinition);
&& !beanDefinition.equals(existingDefinition)) { if (existingDefinition != null
addBeanTypeForNonAliasDefinition(name, beanDefinition); && !beanDefinition.equals(existingDefinition)) {
addBeanTypeForNonAliasDefinition(name, beanDefinition);
}
} }
} }
} }

Loading…
Cancel
Save