[ https://issues.apache.org/jira/browse/VELOCITY-904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson reopened VELOCITY-904: ------------------------------------- There are still some issues with this compatibility flag: * NPE when a macro argument is *not* provided * NPE for some types of constant arguments Also, the flag should mimic the 1.7 behavior in all cases, even when it's not at all consistent: when the provided argument is an expression and is then set to null inside the macro, then the rendered literal is the inner reference name for booleans and numbers only - otherwise (for strings, arrays and maps) it's the input argument literal itself... This behavior can be implemented *except* for arrays and maps (there's a limit to backward compatibility...). > 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: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org