added bean name assertions
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3058 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
5b7217b704
commit
4a733513c1
|
|
@ -901,6 +901,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
|
|||
}
|
||||
|
||||
public boolean isCurrentlyInCreation(String beanName) {
|
||||
Assert.notNull(beanName, "Bean name must not be null");
|
||||
return isSingletonCurrentlyInCreation(beanName) || isPrototypeCurrentlyInCreation(beanName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -262,6 +262,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
|||
|
||||
@Override
|
||||
public boolean containsBeanDefinition(String beanName) {
|
||||
Assert.notNull(beanName, "Bean name must not be null");
|
||||
return this.beanDefinitionMap.containsKey(beanName);
|
||||
}
|
||||
|
||||
|
|
@ -574,7 +575,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
|||
public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition)
|
||||
throws BeanDefinitionStoreException {
|
||||
|
||||
Assert.hasText(beanName, "'beanName' must not be empty");
|
||||
Assert.hasText(beanName, "Bean name must not be empty");
|
||||
Assert.notNull(beanDefinition, "BeanDefinition must not be null");
|
||||
|
||||
if (beanDefinition instanceof AbstractBeanDefinition) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue