From e6436bbbbe7ea9e23f4d36d129c52da071f53c60 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 7 Sep 2009 12:50:49 +0000 Subject: [PATCH] fixed currently-in-creation check to apply with any log level (SPR-5996) --- .../beans/factory/wiring/BeanConfigurerSupport.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java index 2340834cff..6bc42d0137 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/wiring/BeanConfigurerSupport.java @@ -151,11 +151,13 @@ public class BeanConfigurerSupport implements BeanFactoryAware, InitializingBean Throwable rootCause = ex.getMostSpecificCause(); if (rootCause instanceof BeanCurrentlyInCreationException) { BeanCreationException bce = (BeanCreationException) rootCause; - if (logger.isDebugEnabled() && this.beanFactory.isCurrentlyInCreation(bce.getBeanName())) { - logger.debug("Failed to create target bean '" + bce.getBeanName() + - "' while configuring object of type [" + beanInstance.getClass().getName() + - "] - probably due to a circular reference. This is a common startup situation " + - "and usually not fatal. Proceeding without injection. Original exception: " + ex); + if (this.beanFactory.isCurrentlyInCreation(bce.getBeanName())) { + if (logger.isDebugEnabled()) { + logger.debug("Failed to create target bean '" + bce.getBeanName() + + "' while configuring object of type [" + beanInstance.getClass().getName() + + "] - probably due to a circular reference. This is a common startup situation " + + "and usually not fatal. Proceeding without injection. Original exception: " + ex); + } return; } }