Skip to content
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

Ensure varargs component type for MethodHandle is not null in SpEL's ReflectionHelper #33193

Closed
sbrannen opened this issue Jul 10, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

The TypeDescriptor for the varargs component type can currently be null in SpEL's ReflectionHelper.convertAllMethodHandleArguments(...) method; however, that should not be possible.

Whereas, in compareArgumentsVarargs(...) and convertArguments(...) the varargs component type can never be null.

My assumption is that we are using an incorrect combination of Class, ResolvableType, and TypeDescriptor in
convertAllMethodHandleArguments(...).

I discovered this while working on related SpEL issues and added the following TODO which this issue aims to address.

// TODO Determine why componentTypeDesc can be null.
// Assert.state(componentTypeDesc != null, "Component type must not be null for a varargs array");

@sbrannen sbrannen added type: task A general task in: core Issues in core modules (aop, beans, core, context, expression) labels Jul 10, 2024
@sbrannen sbrannen added this to the 6.1.11 milestone Jul 10, 2024
@sbrannen sbrannen self-assigned this Jul 10, 2024
@sbrannen sbrannen added type: enhancement A general enhancement and removed type: task A general task labels Jul 10, 2024
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

No branches or pull requests

1 participant