Deep BeanCurrentlyInCreationException check in getTypeForFactoryBean

Issue: SPR-16427

(cherry picked from commit 7772b91)
This commit is contained in:
Juergen Hoeller
2018-01-29 21:13:59 +01:00
parent f187ca6413
commit 65743a68e6

View File

@@ -1509,7 +1509,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
return getTypeForFactoryBean(factoryBean);
}
catch (BeanCreationException ex) {
if (ex instanceof BeanCurrentlyInCreationException) {
if (ex.contains(BeanCurrentlyInCreationException.class)) {
if (logger.isDebugEnabled()) {
logger.debug("Bean currently in creation on FactoryBean type check: " + ex);
}