diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java index 617cbf0580..884d871893 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java @@ -19,7 +19,6 @@ package org.springframework.beans.factory.config; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; -import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.util.Map; import java.util.Optional; @@ -167,20 +166,6 @@ public class DependencyDescriptor extends InjectionPoint implements Serializable } } - /** - * Check whether the underlying field is annotated with any variant of a - * {@code Nullable} annotation, for example, {@code jakarta.annotation.Nullable} or - * {@code edu.umd.cs.findbugs.annotations.Nullable}. - */ - private boolean hasNullableAnnotation() { - for (Annotation ann : getAnnotations()) { - if ("Nullable".equals(ann.annotationType().getSimpleName())) { - return true; - } - } - return false; - } - /** * Return whether this dependency is 'eager' in the sense of * eagerly resolving potential target beans for type matching.