Avoid "NullAway.Init" suppression in favor of explicit field handling

Closes gh-36961
This commit is contained in:
Juergen Hoeller
2026-06-23 11:55:58 +02:00
parent 9130ded96f
commit bd405756ab
18 changed files with 140 additions and 131 deletions
@@ -23,6 +23,8 @@ import java.util.Set;
import java.util.function.Function;
import java.util.function.Predicate;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
@@ -124,8 +126,7 @@ public abstract class MergedAnnotationPredicates {
private boolean hasLastValue;
@SuppressWarnings("NullAway.Init")
private Object lastValue;
private @Nullable Object lastValue;
FirstRunOfPredicate(Function<? super MergedAnnotation<A>, ?> valueExtractor) {
Assert.notNull(valueExtractor, "Value extractor must not be null");