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

Error message for set directive reports wrong line number

    XMLWordPrintableJSON

Details

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

    Description

      Given the following template:

        1. ##
          #set($list = [1])
          #set($x = "$list.get(1)")

      The MethodInvocationException that report this error reads:

      Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at /foo.vm[line 1, column 7]

      Which contains an incorrect line number.

      Attachments

        1. Velocity629TestCase.java
          2 kB
          Nathan Bubna
        2. fix629_3.patch
          7 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: