Velocity
  1. Velocity
  2. VELOCITY-651

Velocity 1.6 does not work with Struts MessageTool 1.4

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.1, 1.7
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Velocity 1.6, Struts MessageTool 1.4, Struts 1.2.9, Java 1.6_10

      Description

      The org.apache.velocity.tools.struts.MessageTool of VelocityTools version 1.4 contains a method signature of String get(String key, Object args[]).

      With Velocity 1.5, one could use a Struts resource, such as
      test1=this is a

      {0}

      in a Velocity template with
      $text.get('test1', ['TEST'])

      that would render the text
      this is a TEST

      Unfortunately, since the released version 1.6 I get the following exception:
      Invocation of method 'get' in class org.apache.velocity.tools.struts.MessageTool threw exception java.lang.IllegalArgumentException: wrong number of arguments at ..

      The setting of the property runtime.references.strict has no influence.

        Activity

        Stephan Schmid created issue -
        Nathan Bubna made changes -
        Field Original Value New Value
        Fix Version/s 1.7 [ 12313453 ]
        Fix Version/s 1.6.1 [ 12313544 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12447529 ] Default workflow, editable Closed status [ 12551660 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551660 ] jira [ 12552536 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Stephan Schmid
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development