From 54d03460844cbeb938a8be7ef2f9ead9f2cd1d48 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 5 Mar 2010 10:49:24 +0000 Subject: [PATCH] do not call isCurrentlyInCreation with null argument (in order to meet newly enforced assertions within the BeanFactory) --- .../beans/factory/config/PropertyPathFactoryBean.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java index ce3e914dc8..518ce93ff3 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -193,7 +193,8 @@ public class PropertyPathFactoryBean implements FactoryBean, BeanNameAwa public Object getObject() throws BeansException { BeanWrapper target = this.targetBeanWrapper; if (target != null) { - if (logger.isWarnEnabled() && this.beanFactory instanceof ConfigurableBeanFactory && + if (logger.isWarnEnabled() && this.targetBeanName != null && + this.beanFactory instanceof ConfigurableBeanFactory && ((ConfigurableBeanFactory) this.beanFactory).isCurrentlyInCreation(this.targetBeanName)) { logger.warn("Target bean '" + this.targetBeanName + "' is still in creation due to a circular " + "reference - obtained value for property '" + this.propertyPath + "' may be outdated!");