Velocity
  1. Velocity
  2. VELOCITY-605

Velocity tools / Message Tool - ambiguous method invocation with latest SVN head (1.6)

    Details

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

      Description

      I compiled the latest SVN head of Velocity today. Template memory consumption has gone down a lot. Great work!

      However, I noticed that i18n string in my templates don't work anymore.

      I have a properties file with:
      toolbar.loggedin=Logged in as <b>

      {0}

      </b>

      in the toolbox.xml:

      <tool>
      <key>msg</key>
      <scope>request</scope>
      <class>
      org.apache.velocity.tools.struts.MessageTool
      </class>
      </tool>

      In the template file I have a string:
      $msg.toolbar.loggedin.insert("joe")

      This works with Velocity 1.5 and Velocity tools 1.4 fine but with latest SVN head build the velocity.log shows:

      Introspection Error : Ambiguous method invocation insert(java.lang.String) for class class org.apache.velocity.tools.struts.MessageTool$TextKey

      and the message isn't rendered at all.

      Any idea what's wrong?

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3h 3m 1 Nathan Bubna 14/Jul/08 21:17
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551545 ] jira [ 12552430 ]
        Mark Thomas made changes -
        Workflow jira [ 12435270 ] Default workflow, editable Closed status [ 12551545 ]
        Nathan Bubna made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Fix Version/s 1.6 [ 12310290 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Hide
        Nathan Bubna added a comment -

        Fixed in revision 676740. Thank you very much, Jarkko, for being an early tester!! It is wonderful to find such bugs before we go through the hassle of a release.

        Show
        Nathan Bubna added a comment - Fixed in revision 676740. Thank you very much, Jarkko, for being an early tester!! It is wonderful to find such bugs before we go through the hassle of a release.
        Hide
        Nathan Bubna added a comment -

        Yep. Looks like i missed a case in my implementation of varargs support. Fix coming shortly...

        Show
        Nathan Bubna added a comment - Yep. Looks like i missed a case in my implementation of varargs support. Fix coming shortly...
        Hide
        Nathan Bubna added a comment -

        Hmm. Looks like a problem with the new varargs support. I'll see if i can whip up a test case...

        Show
        Nathan Bubna added a comment - Hmm. Looks like a problem with the new varargs support. I'll see if i can whip up a test case...
        Jarkko Viinamäki created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Jarkko Viinamäki
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development