Skip to content

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

@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
@sdeleuze sdeleuze closed this in f7fef93 Jun 26, 2025
@sdeleuze
Copy link
Contributor

Merged, thanks for the PR.

@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
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants