fixed decorated BeanDefinition condition for early type checking in AbstractBeanFactory (SPR-7006)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3206 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-03-31 15:21:48 +00:00
parent b9bc32b103
commit 193c2c4fb7
3 changed files with 10 additions and 6 deletions
@@ -480,7 +480,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
// Check decorated bean definition, if any: We assume it'll be easier
// to determine the decorated bean's type than the proxy's type.
BeanDefinitionHolder dbd = mbd.getDecoratedDefinition();
if (dbd != null) {
if (dbd != null && !BeanFactoryUtils.isFactoryDereference(name)) {
RootBeanDefinition tbd = getMergedBeanDefinition(dbd.getBeanName(), dbd.getBeanDefinition(), mbd);
Class targetClass = predictBeanType(dbd.getBeanName(), tbd, FactoryBean.class, typeToMatch);
if (targetClass != null && !FactoryBean.class.isAssignableFrom(targetClass)) {