Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
16.10.0
-
None
-
Unknown
-
Description
Steps to reproduce:
Execute the following Velocity code in XWiki:
#set ($mySet = $collectiontool.getOrderedSet()) #set ($myString = 'a few words') #set ($myArray = $stringtool.split($myString, ' ')) #set ($discard = $mySet.addAll($myArray)) $mySet
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.