Refine null-safety in the spring-core module

Closes gh-34150
This commit is contained in:
Sébastien Deleuze
2024-12-24 16:46:00 +01:00
parent fbc759077c
commit cf90beec0a
5 changed files with 11 additions and 8 deletions

View File

@@ -173,7 +173,6 @@ enum InstrumentedMethod {
/**
* {@link Class#getField(String)}.
*/
@SuppressWarnings("NullAway")
CLASS_GETFIELD(Class.class, "getField", HintType.REFLECTION,
invocation -> {
Field field = invocation.getReturnValue();
@@ -181,7 +180,7 @@ enum InstrumentedMethod {
return runtimeHints -> false;
}
return reflection().onType(field.getDeclaringClass())
.or(reflection().onField(invocation.getReturnValue()));
.or(reflection().onField(field));
}),
/**