SpEL wraps primitive array in Object[]
when invoking varargs method
#33317
Labels
Milestone
Object[]
when invoking varargs method
#33317
Overview
When invoking a varargs method, instead of converting a primitive array to an
Object[]
, the Spring Expression Language (SpEL) incorrectly wraps the primitive array in anObject[]
.For example, given a
format(Object...)
method in a registered#model
variable and the expression#model.format(new int[]{1, 2, 3})
, theformat()
method is currently invoked asformat(new Object[new int[]{1, 2, 3}])
instead offormat(new Object[]{1, 2, 3})
.This is closely related to #33198; however, this issue is specific to varargs method/constructor invocations and not related to
MethodHandle
invocations for registered functions.Related Issues
MethodHandle
function with a primitive array #33198ConversionService
cannot convert primitive array toObject[]
#33212The text was updated successfully, but these errors were encountered: