From 7772b914c694b5b16d6e9c9f56acf7b03b47f9d4 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 29 Jan 2018 21:13:59 +0100 Subject: [PATCH] Deep BeanCurrentlyInCreationException check in getTypeForFactoryBean Issue: SPR-16427 --- .../beans/factory/support/AbstractBeanFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java index 2b6c76eebf..07c87795e5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java @@ -1515,7 +1515,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); }