[ 
https://issues.apache.org/jira/browse/VELOCITY-681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666563#action_12666563
 ] 

Nathan Bubna commented on VELOCITY-681:
---------------------------------------

Thanks for testing this out, Jarkko.   Ok, if it worked in 1.5 and 1.6 but not 
in 1.6.1, then i'm fine with this being added to the 1.6.x branch.  In a bugfix 
release, we should try to keep changes in behavior minimal.   I think though, 
that this is strange, surprising and uncommonly used enough that we should 
leave it out of the trunk.  We can just put a notice in the changelog that as 
of 1.7, this behavior is no longer valid.  Even after thinking about it for a 
night, i'm convinced the current trunk treatment of #setting macro args is 
superior.

> [regression] Changes on the macro parameters are not persisted outside the 
> macro call
> -------------------------------------------------------------------------------------
>
>                 Key: VELOCITY-681
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-681
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6.1
>            Reporter: Sergiu Dumitriu
>            Priority: Critical
>             Fix For: 1.6.2, 1.7
>
>         Attachments: VELOCITY-681-1.6.patch, VELOCITY-681-trunk.patch
>
>
> The fix for VELOCITY-615 was too radical, since it completely disables 
> #setting new values to the formal arguments. A minimalistic example that used 
> to work up to 1.6 (but not with 1.6.1) is:
> {noformat}
> #macro(myMacro $result)
>   #set($result = 'some value')
> #end
> #myMacro($x)
> $x
> {/noformat}
> which prints $x (as an undefined variable).

-- 
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: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to