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

#foreach exception reports wrong line number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.6
    • Engine
    • None

    Description

      With the velocity configuration property 'directive.foreach.skip.invalid' set to false, the following VTL:

      #set($x = "abc")
      #foreach($i in $x)
      blaa
      #end

      Creates the exception:

      Uberspect returned a null iterator for #foreach at /foo.vm [line 0, column 0]. $x (abc) is either of wrong type or has an invalid iterator() implementation

      Which contains the wrong line and column numbers.

      Attachments

        1. fix627.patch
          4 kB
          Byron Foster

        Activity

          People

            Unassigned Unassigned
            byronvf Byron Foster
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: