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

#stop produces unexpected results when used with #parse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.5
    • Engine
    • None

    Description

      On 20th of January (2006) I took the latest trunk from SVN, and tried it against some Velocity templates I am just working on. I came across two bugs, which I am reporting here, along with patches:

      1. When #stop is issued from within #parse, the processing of subsequent #parse directives does not stop. Since expressions are no longer being rendered after a #stop, the parameter to #parse can be an empty string, resulting in an unexpected exception that confuses the user. I am attaching an example that reproduces this (stop3.vm, stop3-include.vm), with a patch
      (-1.patch).

      2. I came across a string-out-of-bounds exception which happened because string length was not being checked. Patch is attached.

      Attachments

        1. stop3-include.vm
          0.1 kB
          Klemen Zagar
        2. stop3.vm
          0.2 kB
          Klemen Zagar
        3. velocity-2006-01-20-1.patch
          1 kB
          Klemen Zagar
        4. velocity-2006-01-20-2.patch
          0.8 kB
          Klemen Zagar

        Activity

          People

            Unassigned Unassigned
            kzagar Klemen Zagar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: