[
https://issues.apache.org/jira/browse/VELOCITY-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17019513#comment-17019513
]
Thomas Mortagne commented on VELOCITY-904:
------------------------------------------
Just found another related regression:
{noformat}
#macro (testMacro $test $name)
$name
#end
#testMacro($other, $test.name)
{noformat}
Velocity 1.7: print the result of $test.name
Velocity 2.2: print "$test.name"
>From what I understand the first parameter of testMacro is injected in the
>context before "$test.name" is interpreted so it breaks it (works fine when
>renaming the first parameter into $test2 or if $test is the parameter
>receiving the expression).
> Add a flag for better backward compatibility with null macro arguments
> ----------------------------------------------------------------------
>
> Key: VELOCITY-904
> URL: https://issues.apache.org/jira/browse/VELOCITY-904
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Affects Versions: 2.0
> Reporter: Claude Brisson
> Assignee: Claude Brisson
> Priority: Minor
> Fix For: 2.2
>
>
> See [this
> comment|https://issues.apache.org/jira/browse/VELOCITY-542?focusedCommentId=16621819&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16621819]
> :
> {code}
> #macro(testmacro $parameter)
> $parameter
> #end
> #testmacro($return)
> {code}
> bq. which used to print "$return" (when $return is null or undefined) and we
> now get "$parameter".
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]