Velocity
  1. Velocity
  2. VELOCITY-629

Error message for set directive reports wrong line number

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6-beta1
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      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.

      1. fix629_3.patch
        7 kB
        Byron Foster
      2. Velocity629TestCase.java
        2 kB
        Nathan Bubna

        Activity

        Byron Foster created issue -
        Byron Foster made changes -
        Field Original Value New Value
        Affects Version/s 1.6-beta1 [ 12313452 ]
        Component/s Engine [ 12311337 ]
        Byron Foster made changes -
        Attachment fix629.patch [ 12392071 ]
        Byron Foster made changes -
        Attachment fix629_2.patch [ 12392119 ]
        Byron Foster made changes -
        Attachment fix629.patch [ 12392071 ]
        Nathan Bubna made changes -
        Attachment Velocity629TestCase.java [ 12392123 ]
        Byron Foster made changes -
        Attachment fix629_3.patch [ 12392142 ]
        Byron Foster made changes -
        Attachment fix629_2.patch [ 12392119 ]
        Nathan Bubna made changes -
        Fix Version/s 1.6 [ 12310290 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12443976 ] Default workflow, editable Closed status [ 12551583 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551583 ] jira [ 12552468 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Byron Foster
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development