Deep BeanCurrentlyInCreationException check in getTypeForFactoryBean

Issue: SPR-16427
This commit is contained in:
Juergen Hoeller
2018-01-29 21:13:59 +01:00
parent 32f6ccece8
commit 7772b914c6

View File

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