Skip to content

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

Closed
@sbrannen

Description

@sbrannen

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");

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions