Thomas Mortagne commented on VELOCITY-904:

Looks like there is still differences with 1.7 when the passed variable is not 

#macro(testmacro $parameter)
  #set($parameter = $NULL)


#set($return = 'value')

1.7: $return
2.2RC1: $parameter

We have some code which expect the 1.7 behaviour so while it's easy to 
workaround (set it to null before calling testmacro) it's not very convenient 
and not easy to track down all places to fix for 2.2 plus we don't control all 
the scripts used with XWiki as a development platform anyway so it can be a big 
breakage for some users.

> 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.1
> 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

To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to