File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
spring-beans/src/main/java/org/springframework/beans/factory/support Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,8 @@ public void copyConfigurationFrom(ConfigurableBeanFactory otherFactory) {
317
317
this .allowEagerClassLoading = otherListableFactory .allowEagerClassLoading ;
318
318
this .dependencyComparator = otherListableFactory .dependencyComparator ;
319
319
// A clone of the AutowireCandidateResolver since it is potentially BeanFactoryAware...
320
- setAutowireCandidateResolver (BeanUtils .instantiateClass (getAutowireCandidateResolver ().getClass ()));
320
+ setAutowireCandidateResolver (
321
+ BeanUtils .instantiateClass (otherListableFactory .getAutowireCandidateResolver ().getClass ()));
321
322
// Make resolvable dependencies (e.g. ResourceLoader) available here as well...
322
323
this .resolvableDependencies .putAll (otherListableFactory .resolvableDependencies );
323
324
}
@@ -904,7 +905,7 @@ protected void resetBeanDefinition(String beanName) {
904
905
for (String bdName : this .beanDefinitionNames ) {
905
906
if (!beanName .equals (bdName )) {
906
907
BeanDefinition bd = this .beanDefinitionMap .get (bdName );
907
- if (beanName .equals (bd .getParentName ())) {
908
+ if (bd != null && beanName .equals (bd .getParentName ())) {
908
909
resetBeanDefinition (bdName );
909
910
}
910
911
}
You can’t perform that action at this time.
0 commit comments