Remove obsolete code

The hasNullableAnnotation() method was made obsolete in commit
b5d153febf.

See gh-34952
See gh-34261
This commit is contained in:
Sam Brannen
2025-06-07 12:23:56 +02:00
parent 799a37602d
commit 0b4f7f2f9d

View File

@@ -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.