@@ -443,7 +443,8 @@ public static List<Field> findAnnotatedFields(Class<?> clazz, Class<? extends An
443
443
* @see ReflectionSupport#tryToReadFieldValue(Field, Object)
444
444
*/
445
445
@ API (status = MAINTAINED , since = "1.4" )
446
- public static List <Object > findAnnotatedFieldValues (Object instance , Class <? extends Annotation > annotationType ) {
446
+ public static List <@ Nullable Object > findAnnotatedFieldValues (Object instance ,
447
+ Class <? extends Annotation > annotationType ) {
447
448
Preconditions .notNull (instance , "instance must not be null" );
448
449
449
450
List <Field > fields = findAnnotatedFields (instance .getClass (), annotationType , ModifierSupport ::isNotStatic ,
@@ -475,7 +476,8 @@ public static List<Object> findAnnotatedFieldValues(Object instance, Class<? ext
475
476
* @see ReflectionSupport#tryToReadFieldValue(Field, Object)
476
477
*/
477
478
@ API (status = MAINTAINED , since = "1.4" )
478
- public static List <Object > findAnnotatedFieldValues (Class <?> clazz , Class <? extends Annotation > annotationType ) {
479
+ public static List <@ Nullable Object > findAnnotatedFieldValues (Class <?> clazz ,
480
+ Class <? extends Annotation > annotationType ) {
479
481
480
482
List <Field > fields = findAnnotatedFields (clazz , annotationType , ModifierSupport ::isStatic ,
481
483
HierarchyTraversalMode .TOP_DOWN );
@@ -510,8 +512,8 @@ public static List<Object> findAnnotatedFieldValues(Class<?> clazz, Class<? exte
510
512
*/
511
513
@ SuppressWarnings ("unchecked" )
512
514
@ API (status = MAINTAINED , since = "1.4" )
513
- public static <T > List <T > findAnnotatedFieldValues (Object instance , Class <? extends Annotation > annotationType ,
514
- Class <T > fieldType ) {
515
+ public static <T extends @ Nullable Object > List <T > findAnnotatedFieldValues (Object instance ,
516
+ Class <? extends Annotation > annotationType , Class < T > fieldType ) {
515
517
516
518
Preconditions .notNull (instance , "instance must not be null" );
517
519
Preconditions .notNull (fieldType , "fieldType must not be null" );
@@ -552,8 +554,8 @@ public static <T> List<T> findAnnotatedFieldValues(Object instance, Class<? exte
552
554
*/
553
555
@ SuppressWarnings ("unchecked" )
554
556
@ API (status = MAINTAINED , since = "1.4" )
555
- public static <T > List <T > findAnnotatedFieldValues (Class <?> clazz , Class <? extends Annotation > annotationType ,
556
- Class <T > fieldType ) {
557
+ public static <T extends @ Nullable Object > List <T > findAnnotatedFieldValues (Class <?> clazz ,
558
+ Class <? extends Annotation > annotationType , Class < T > fieldType ) {
557
559
558
560
Preconditions .notNull (fieldType , "fieldType must not be null" );
559
561
0 commit comments