@@ -296,7 +296,7 @@ public Boolean process(AnnotatedElement annotatedElement, Annotation annotation,
296296 */
297297 public static <A extends Annotation > A getMergedAnnotation (AnnotatedElement element , Class <A > annotationType ) {
298298 AnnotationAttributes attributes = getMergedAnnotationAttributes (element , annotationType );
299- return ( attributes != null ? AnnotationUtils .synthesizeAnnotation (attributes , annotationType , element ) : null );
299+ return AnnotationUtils .synthesizeAnnotation (attributes , annotationType , element );
300300 }
301301
302302 /**
@@ -401,8 +401,7 @@ public static AnnotationAttributes getMergedAnnotationAttributes(AnnotatedElemen
401401 public static <A extends Annotation > A findMergedAnnotation (AnnotatedElement element , Class <A > annotationType ) {
402402 Assert .notNull (annotationType , "annotationType must not be null" );
403403 AnnotationAttributes attributes = findMergedAnnotationAttributes (element , annotationType , false , false );
404- return (attributes != null ?
405- AnnotationUtils .synthesizeAnnotation (attributes , annotationType , element ) : null );
404+ return AnnotationUtils .synthesizeAnnotation (attributes , annotationType , element );
406405 }
407406
408407 /**
@@ -429,8 +428,7 @@ public static <A extends Annotation> A findMergedAnnotation(AnnotatedElement ele
429428 @ SuppressWarnings ("unchecked" )
430429 public static <A extends Annotation > A findMergedAnnotation (AnnotatedElement element , String annotationName ) {
431430 AnnotationAttributes attributes = findMergedAnnotationAttributes (element , annotationName , false , false );
432- return (attributes != null ?
433- AnnotationUtils .synthesizeAnnotation (attributes , (Class <A >) attributes .annotationType (), element ) : null );
431+ return AnnotationUtils .synthesizeAnnotation (attributes , (Class <A >) attributes .annotationType (), element );
434432 }
435433
436434 /**
0 commit comments