Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-594

null-values cannot be set in macros

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.6
    • None
    • None
    • Windows XP SP2

    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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jukefox jukefox
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment