Validate Class attributes as well as Class array attributes
Issue: SPR-16564
This commit is contained in:
@@ -912,7 +912,8 @@ public abstract class AnnotationUtils {
|
|||||||
*/
|
*/
|
||||||
public static void validateAnnotation(Annotation annotation) {
|
public static void validateAnnotation(Annotation annotation) {
|
||||||
for (Method method : getAttributeMethods(annotation.annotationType())) {
|
for (Method method : getAttributeMethods(annotation.annotationType())) {
|
||||||
if (method.getReturnType() == Class.class) {
|
Class<?> returnType = method.getReturnType();
|
||||||
|
if (returnType == Class.class || returnType == Class[].class) {
|
||||||
try {
|
try {
|
||||||
method.invoke(annotation);
|
method.invoke(annotation);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user