Velocity
  1. Velocity
  2. VELOCITY-452

In ASTMethod.execute the IllegalArgumentException should be catched

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None

      Description

      The IllegalArgumentException can be thrown by java.lang.reflect.Method#invoke(java.lang.Object, java.lang.Object[])

      <blockquote>
      if the method is an instance method and the specified object argument is not an instance of the class or interface declaring the underlying method (or of a subclass or implementor thereof); if the number of actual and formal parameters differ; if an unwrapping conversion for primitive arguments fails; or if, after possible unwrapping, a parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion.
      </blockquote>

      It is caused by the passed parameters and should be catched to provide the location in template to the template author.

        Activity

        Alexey Panchenko created issue -
        Hide
        Will Glass-Husain added a comment -

        Sounds reasonable. Let me review and if it looks good, commit. Thanks for submitting!

        P.S. Appreciate your attention to detail re: the code guidelines - makes it much easier to review.

        Show
        Will Glass-Husain added a comment - Sounds reasonable. Let me review and if it looks good, commit. Thanks for submitting! P.S. Appreciate your attention to detail re: the code guidelines - makes it much easier to review.
        Will Glass-Husain made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Hide
        Henning Schmiedehausen added a comment -

        I look into this for 1.5.

        Show
        Henning Schmiedehausen added a comment - I look into this for 1.5.
        Henning Schmiedehausen made changes -
        Assignee Henning Schmiedehausen [ henning ]
        Component/s Source [ 12310214 ]
        Component/s Engine [ 12311337 ]
        Hide
        Will Glass-Husain added a comment -

        missed this for 1.5, assigning to 1.6

        Show
        Will Glass-Husain added a comment - missed this for 1.5, assigning to 1.6
        Will Glass-Husain made changes -
        Fix Version/s 1.6 [ 12310290 ]
        Hide
        Will Glass-Husain added a comment -

        patch applied - many thanks, Alexey!

        Show
        Will Glass-Husain added a comment - patch applied - many thanks, Alexey!
        Will Glass-Husain made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Mark Thomas made changes -
        Workflow jira [ 12382746 ] Default workflow, editable Closed status [ 12551467 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551467 ] jira [ 12552227 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        288d 37m 1 Will Glass-Husain 15/Jun/07 06:31

          People

          • Assignee:
            Henning Schmiedehausen
            Reporter:
            Alexey Panchenko
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development