AnnotationUtils.getAnnotation non-null check for synthesizeAnnotation

Issue: SPR-16708
master
Juergen Hoeller 7 years ago
parent 61c3db0869
commit da80502ea6
  1. 3
      spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java

@ -166,7 +166,8 @@ public abstract class AnnotationUtils {
}
Class<? extends Annotation> annotatedElement = annotation.annotationType();
try {
return synthesizeAnnotation(annotatedElement.getAnnotation(annotationType), annotatedElement);
A metaAnn = annotatedElement.getAnnotation(annotationType);
return (metaAnn != null ? synthesizeAnnotation(metaAnn, annotatedElement) : null);
}
catch (Throwable ex) {
handleIntrospectionFailure(annotatedElement, ex);

Loading…
Cancel
Save