SpEL cannot invoke varargs MethodHandle
function with an array
#33191
Labels
Milestone
MethodHandle
function with an array
#33191
The Spring Expression Language (SpEL) currently cannot invoke a varargs
MethodHandle
function with an array, although that is supported for a varargsMethod
function.Attempting to do so results in the array being supplied as a single argument to the
MethodHandle
.For example, given a
MethodHandle
registered as a function namedformat
that accepts(String, Object...)
, the SpEL expression#format('x', 'a', 'z')
is supported, but the expression#format('x', new Object[]{'a', 'z'})
fails to evaluate since theMethodHandle
is invoked with('x', ['a', 'z'])
whereas('x', 'a', 'z')
is required for aMethodHandle
invocation.The text was updated successfully, but these errors were encountered: