[
https://issues.apache.org/jira/browse/VELOCITY-594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jukefox updated VELOCITY-594:
-----------------------------
Description:
There is an issue with the new supported feature of assigning null-values to
velocity variables. The following scenarios illustrate the error. The
configuration parameter _directive.set.null.allowed_ must be set to _true_.
Scenario 1 (correct behaviour outside macro):
{code:title=Bar.java|borderStyle=solid}
#set ($test = "test")
$test
#set ($test = $null)
$test
{code}
yields to the output:
{code|borderStyle=solid}
test
$NULL
{code}
Scenario 2 (erroneous behaviour using macro):
{code|borderStyle=solid}
#macro (test)
#set ($test = "test")
$test
#set ($test = $null)
$test
#end
#test()
{code}
yields to the output:
{code|borderStyle=solid}
test
test
{code}
and the varibale test has not been resetted to null which is the error.
was:
There is an issue with the new supported feature of assigning null-values to
velocity variables. The following scenarios illustrate the error. The
configuration parameter <i>directive.set.null.allowed</i> must be set to
<i>true</i>.
Scenario 1 (correct behaviour outside macro):
<pre>
#set ($test = "test")
$test
#set ($test = $null)
$test
</pre>
yields to the output:
<pre>
test
$NULL
</pre>
Scenario 2 (erroneous behaviour using macro):
<pre>
#macro (test)
#set ($test = "test")
$test
#set ($test = $null)
$test
#end
#test()
</pre>
yields to the output:
<pre>
test
test
</pre>
and the varibale test has not been resetted to null which is the error.
> null-values cannot be set in macros
> -----------------------------------
>
> Key: VELOCITY-594
> URL: https://issues.apache.org/jira/browse/VELOCITY-594
> Project: Velocity
> Issue Type: Bug
> Affects Versions: 1.5
> Environment: Windows XP SP2
> Reporter: jukefox
>
> There is an issue with the new supported feature of assigning null-values to
> velocity variables. The following scenarios illustrate the error. The
> configuration parameter _directive.set.null.allowed_ must be set to _true_.
> Scenario 1 (correct behaviour outside macro):
> {code:title=Bar.java|borderStyle=solid}
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> {code}
> yields to the output:
> {code|borderStyle=solid}
> test
> $NULL
> {code}
> Scenario 2 (erroneous behaviour using macro):
> {code|borderStyle=solid}
> #macro (test)
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> #end
> #test()
> {code}
> yields to the output:
> {code|borderStyle=solid}
> test
> test
> {code}
> and the varibale test has not been resetted to null which is the error.
--
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]