[ 
https://issues.apache.org/jira/browse/VELOCITY-534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nathan Bubna updated VELOCITY-534:
----------------------------------

    Attachment: varargs.diff

Here's a proposed patch for this.  I need to spruce up and flesh out the tests 
a bit more, but i think i have most of the bases covered.

And for the observant, yes, this would allow vararg method calls in VTL for any 
method whose final parameter is an array.  Java 5 is not needed at all.   The 
only backwards compatibility issue would be that some previously broken method 
calls might now work.  I think that's fine though.

Thoughts?  I'll try to provide a link to a build shortly to make this easy to 
play with.  I'd love some feedback on this (re: implementation, effects, 
performance, etc) before i commit it.

> Support varargs in method calls
> -------------------------------
>
>                 Key: VELOCITY-534
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-534
>             Project: Velocity
>          Issue Type: Improvement
>    Affects Versions: 1.5
>            Reporter: Nathan Bubna
>             Fix For: 1.6, 2.0
>
>         Attachments: varargs.diff
>
>
> If possible and as much as possible without breaking JDK 1.3/JDK 1.4 runtime 
> support, i would like to see us support varargs for method calls.  So,
> public class MyTool {
>     public List combine(List... lists) {
>         ...
>     }
> }
> #set( $twoLists = $myTool.combine($list1, $list2) )
> #set( $threeLists = $myTool.combine($list1, $list2, $list3) )
> will work out of the box, without need for the user to rebuild Velocity 
> themselves.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to