isRefreshScoped returns false if beanName is null

Refer to notes in https://github.com/spring-cloud/spring-cloud-commons/issues/49 for details
This commit is contained in:
Glenn Renfro
2015-08-20 11:28:08 -04:00
parent adcd4a83ac
commit e4bacc1353

View File

@@ -122,7 +122,7 @@ ApplicationListener<EnvironmentChangeEvent>, ApplicationContextAware {
}
}
}
if (this.refreshScope == null) {
if (beanName == null || this.refreshScope == null) {
return false;
}
return this.beanFactory.containsBeanDefinition(beanName)