do not call isCurrentlyInCreation with null argument (in order to meet newly enforced assertions within the BeanFactory)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3059 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
4a733513c1
commit
8c7221ce32
|
|
@ -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<Object>, 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!");
|
||||
|
|
|
|||
Loading…
Reference in New Issue