Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
scordio wants to merge 1 commit into spring-projects:main from scordio:missing-nullable

Conversation

Copy link
Contributor

@scordio scordio commented Jun 21, 2025
edited
Loading

Prior to this change, the nullness of the MethodInvoker::setArguments parameter targeted the array component only, which means that an invocation like setArguments((Object[]) 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 a null array should be permitted, allowing the property to be unset.

Therefore, @Nullable is now added to allow a given array 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
@sdeleuze sdeleuze self-assigned this Jun 24, 2025
@sdeleuze sdeleuze added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 24, 2025
@sdeleuze sdeleuze added this to the 7.0.0-M7 milestone Jun 24, 2025
Copy link
Contributor

Merged, thanks for the PR.

scordio reacted with thumbs up emoji

@scordio scordio deleted the missing-nullable branch June 26, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Milestone
7.0.0-M7
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /