Details
-
Bug
-
Resolution: Fixed
-
Major
-
16.10.0
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
Steps to reproduce:
Execute the following Velocity code in XWiki:
#set ($myList = [])
#set ($myString = 'a few words')
#set ($myArray = $myString.split(' '))
#set ($discard = $myList.addAll($myArray))
$myList
Expected result:
[a, few, words]
Actual result:
[]
The root cause seems to be that the conversion of the argument fails because during the conversion the type variable isn't resolved.
See XCOMMONS-129 for a workaround how to convert the array to a list first.