[ 
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):

#set ($test = "test")
$test
#set ($test = $null)
$test

yields to the output:

test
$test

Scenario 2 (erroneous behaviour using macro):

#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()

yields to the output:

test
test

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 "directive.set.null.allowed" must be set to "true".

Scenario 1 (correct behaviour outside macro):

#set ($test = "test")
$test
#set ($test = $null)
$test

yields to the output:

test
$NULL

Scenario 2 (erroneous behaviour using macro):

#macro (test)
    #set ($test = "test")
    $test
    #set ($test = $null)
    $test
#end

#test()

yields to the output:

test
test

and the varibale test has not been resetted to null which is the error.



Corrected my output in scenario 1.


> 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):
> #set ($test = "test")
> $test
> #set ($test = $null)
> $test
> yields to the output:
> test
> $test
> Scenario 2 (erroneous behaviour using macro):
> #macro (test)
>     #set ($test = "test")
>     $test
>     #set ($test = $null)
>     $test
> #end
> #test()
> yields to the output:
> test
> test
> 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]

Reply via email to