File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spring-aop/src/main/java/org/springframework/aop/framework/autoproxy Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,14 +94,14 @@ public static Class<?> determineTargetClass(ConfigurableListableBeanFactory bean
94
94
}
95
95
96
96
/**
97
- * Expose the given target class for the specified bean.
97
+ * Expose the given target class for the specified bean, if possible .
98
98
* @param beanFactory the containing ConfigurableListableBeanFactory
99
99
* @param beanName the name of the bean
100
100
* @param targetClass the corresponding target class
101
101
* @since 4.2.3
102
102
*/
103
103
static void exposeTargetClass (ConfigurableListableBeanFactory beanFactory , String beanName , Class <?> targetClass ) {
104
- if (beanFactory .containsBeanDefinition (beanName )) {
104
+ if (beanName != null && beanFactory .containsBeanDefinition (beanName )) {
105
105
beanFactory .getMergedBeanDefinition (beanName ).setAttribute (ORIGINAL_TARGET_CLASS_ATTRIBUTE , targetClass );
106
106
}
107
107
}
You can’t perform that action at this time.
0 commit comments