diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java index 3fb11e3095..59c6cf5327 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java @@ -912,7 +912,8 @@ public abstract class AnnotationUtils { */ public static void validateAnnotation(Annotation annotation) { for (Method method : getAttributeMethods(annotation.annotationType())) { - if (method.getReturnType() == Class.class) { + Class returnType = method.getReturnType(); + if (returnType == Class.class || returnType == Class[].class) { try { method.invoke(annotation); }