diff --git a/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java b/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java index e7937c815cd..5945d562afe 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java @@ -604,7 +604,7 @@ private boolean isFiltered(String attributeName) { return clazz.getClassLoader(); } if (this.source instanceof Member member) { - member.getDeclaringClass().getClassLoader(); + return member.getDeclaringClass().getClassLoader(); } } return null;