Polishing

This commit is contained in:
Juergen Hoeller
2020-04-25 16:37:16 +02:00
parent e5a292fb34
commit af65b1ca62
3 changed files with 21 additions and 23 deletions

View File

@@ -769,8 +769,8 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
if (this.parentBeanFactory != null && this.parentBeanFactory != parentBeanFactory) {
throw new IllegalStateException("Already associated with parent BeanFactory: " + this.parentBeanFactory);
}
if(this == parentBeanFactory) {
throw new IllegalStateException("Can not set parent bean factory to self.");
if (this == parentBeanFactory) {
throw new IllegalStateException("Cannot set parent bean factory to self");
}
this.parentBeanFactory = parentBeanFactory;
}