From b07b1469658e4a28b3b1b3460e86e62a54e8c86f Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 4 Mar 2010 22:33:59 +0000 Subject: [PATCH] fixed @Configurable issue with null bean name (SPR-6947) --- .../aop/framework/autoproxy/AutoProxyUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java b/org.springframework.aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java index 4d0fe9d69b..dbc184c2a3 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 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. @@ -52,7 +52,7 @@ public abstract class AutoProxyUtils { * @return whether the given bean should be proxied with its target class */ public static boolean shouldProxyTargetClass(ConfigurableListableBeanFactory beanFactory, String beanName) { - if (beanFactory.containsBeanDefinition(beanName)) { + if (beanName != null && beanFactory.containsBeanDefinition(beanName)) { BeanDefinition bd = beanFactory.getBeanDefinition(beanName); return Boolean.TRUE.equals(bd.getAttribute(PRESERVE_TARGET_CLASS_ATTRIBUTE)); }