SpEL no longer supports lists for varargs invocations #33315
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
The changes made in conjunction with #33013 resulted in a regression for varargs support in SpEL expressions.
Specifically, before #33013 one could supply an inline list as the varargs array when invoking a varargs constructor, method, or function within a SpEL expression. However, after #33013 an inline list (or collection in general) is no longer converted to an array for varargs invocations. Instead, the list is supplied as a single argument of the resulting varargs array.
See #33013 (comment) and subsequent comments for details.
Although it was never intended that one could supply an inline list as the set of varargs, we concede that this is a regression in existing behavior and will therefore restore this support. However, we do not intend to restore support for converting arbitrary single objects to an array for varargs invocations if the single object is already an instance of the varargs array's component type. In other words, we only intend to restore support for converting a single inline list to a varargs array.
The text was updated successfully, but these errors were encountered: