SpEL fails to invoke MethodHandle
function reference accepting only varargs
#34109
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
SpEL fails to invoke function references whose function handle only consists of varargs parameters.
This seems to be failing because in FunctionReference,
methodHandle.invokeWithArguments(functionArgs)
is invoked withfunctionArgs
being set asObject[] {String[] {"a", "b", "c"}}
. Instead of being wrapped in anObject[]
,functionArgs
should have just beenString[] {"a", "b", "c"}
.Reproduction
Spring Framework:
6.1.16
Here's a simple test class to reproduce it:
The text was updated successfully, but these errors were encountered: