diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java index 8631fdf73a..6e1552aa1c 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java @@ -916,7 +916,7 @@ public abstract class AnnotatedElementUtils { } if (element instanceof Class) { // otherwise getAnnotations doesn't return anything new - Class superclass = ((Class) element).getSuperclass(); + Class superclass = ((Class) element).getSuperclass(); if (superclass != null && superclass != Object.class) { List inheritedAnnotations = new LinkedList<>(); for (Annotation annotation : element.getAnnotations()) {