@@ -296,7 +296,7 @@ public Boolean process(AnnotatedElement annotatedElement, Annotation annotation,
296
296
*/
297
297
public static <A extends Annotation > A getMergedAnnotation (AnnotatedElement element , Class <A > annotationType ) {
298
298
AnnotationAttributes attributes = getMergedAnnotationAttributes (element , annotationType );
299
- return ( attributes != null ? AnnotationUtils .synthesizeAnnotation (attributes , annotationType , element ) : null );
299
+ return AnnotationUtils .synthesizeAnnotation (attributes , annotationType , element );
300
300
}
301
301
302
302
/**
@@ -401,8 +401,7 @@ public static AnnotationAttributes getMergedAnnotationAttributes(AnnotatedElemen
401
401
public static <A extends Annotation > A findMergedAnnotation (AnnotatedElement element , Class <A > annotationType ) {
402
402
Assert .notNull (annotationType , "annotationType must not be null" );
403
403
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 );
406
405
}
407
406
408
407
/**
@@ -429,8 +428,7 @@ public static <A extends Annotation> A findMergedAnnotation(AnnotatedElement ele
429
428
@ SuppressWarnings ("unchecked" )
430
429
public static <A extends Annotation > A findMergedAnnotation (AnnotatedElement element , String annotationName ) {
431
430
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 );
434
432
}
435
433
436
434
/**
0 commit comments