Refine null-safety based on IDEA warnings

See gh-28797
This commit is contained in:
Sébastien Deleuze
2025-01-22 12:20:41 +01:00
parent 4189f8b477
commit 7f21443a1b
22 changed files with 61 additions and 47 deletions

View File

@@ -16,6 +16,8 @@
package org.springframework.expression;
import org.jspecify.annotations.Nullable;
/**
* A {@code ConstructorExecutor} is built by a {@link ConstructorResolver} and
* can be cached by the infrastructure to repeat an operation quickly without
@@ -49,6 +51,6 @@ public interface ConstructorExecutor {
* @throws AccessException if there is a problem executing the constructor or
* if this {@code ConstructorExecutor} has become stale
*/
TypedValue execute(EvaluationContext context, Object... arguments) throws AccessException;
TypedValue execute(EvaluationContext context, @Nullable Object... arguments) throws AccessException;
}

View File

@@ -16,6 +16,8 @@
package org.springframework.expression;
import org.jspecify.annotations.Nullable;
/**
* A {@code MethodExecutor} is built by a {@link MethodResolver} and can be cached
* by the infrastructure to repeat an operation quickly without going back to the
@@ -50,6 +52,6 @@ public interface MethodExecutor {
* @throws AccessException if there is a problem executing the method or
* if this {@code MethodExecutor} has become stale
*/
TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException;
TypedValue execute(EvaluationContext context, Object target, @Nullable Object... arguments) throws AccessException;
}