AnnotationUtils.getAnnotation non-null check for synthesizeAnnotation

Issue: SPR-16708
This commit is contained in:
Juergen Hoeller 2018-04-11 12:50:27 +02:00
parent 61c3db0869
commit da80502ea6
1 changed files with 2 additions and 1 deletions

View File

@ -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);