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 an Object[].
For example, given a format(Object...) method in a registered #model variable and the expression #model.format(new int[]{1, 2, 3}), the format() method is currently invoked as format(new Object[new int[]{1, 2, 3}]) instead of format(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
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#modelvariable 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
MethodHandleinvocations for registered functions.Related Issues
MethodHandlefunction with a primitive array #33198ConversionServicecannot convert primitive array toObject[]#33212