Skip to content

Add missing @Nullable to MethodInvoker::setArguments parameter #35089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scordio
Copy link
Contributor

@scordio scordio commented Jun 21, 2025

Prior to this change, the nullness of the MethodInvoker::setArguments parameter targeted the array component only, which means that an invocation like setArguments(null) was forbidden.

However, the Javadoc mentions:

If this property is not set, or the Object array is of length 0, a method with no arguments is assumed.

The way I interpret the part in bold is that passing null should be permitted so that the property can be unset.

Therefore, @Nullable is now added to allow the setter parameter to be null.

This emerged during the work on spring-projects/spring-batch#4864.

Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged or decided on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants