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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.6
    • Engine
    • 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            wyla Jarkko Viinamäki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: