Agreed, I can't see what that line should do, if anything.
The best it can do is add a null element to the list, kicking the value to index 1.
As for the thinking of the author, the comment implies he didn't clarify his thinking
about what was being done and why so I'd favor simply dropping the line and doing a
few basic (manual) "does it still work" tests to be sure.
Thanks,
Caleb
On 05/23/2015 10:56 AM, vincent(a)massol.net wrote:
Hi devs,
I’ve noticed the following in getusers.vm:
#set ($arr = [])
#set( $discard = $arr.add( null ) ) ## this may be variable...
#set( $discard = $arr.add( "$value" ) )
The “null” part doesn’t seem correct at all and I don’t understand the comment "##
this may be variable…”
Any idea what the original author wanted to do?
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Satire is the escape hatch from the cycle of sorrow, hatred and violence. #JeSuisCharlie