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
9494 }
9595
9696 /**
97- * Expose the given target class for the specified bean.
97+ * Expose the given target class for the specified bean, if possible .
9898 * @param beanFactory the containing ConfigurableListableBeanFactory
9999 * @param beanName the name of the bean
100100 * @param targetClass the corresponding target class
101101 * @since 4.2.3
102102 */
103103 static void exposeTargetClass (ConfigurableListableBeanFactory beanFactory , String beanName , Class <?> targetClass ) {
104- if (beanFactory .containsBeanDefinition (beanName )) {
104+ if (beanName != null && beanFactory .containsBeanDefinition (beanName )) {
105105 beanFactory .getMergedBeanDefinition (beanName ).setAttribute (ORIGINAL_TARGET_CLASS_ATTRIBUTE , targetClass );
106106 }
107107 }
You can’t perform that action at this time.
0 commit comments