Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2511

i18n tag never calls getTexts(bundleName) of TextProvider

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.11, 2.1.1
    • 2.1.1
    • Other
    • None

    Description

      The i18n tag uses the following code to invoke the getTexts(bundleName) method using a TextProvider in the ValueStack:

      ResourceBundle bundle = (ResourceBundle) findValue("texts('" + name + "')");

      This never works. It should read:

      ResourceBundle bundle = (ResourceBundle) findValue("getTexts('" + name + "')");

      The code would have only occasionally caused problems as the tag calls LocalizedTextUtil.findResourceBundle(name...) anyway when the line above failed.

      For the record, I think calling methods by embedding non-typesafe expressions in code is a bad idea.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeromy Jeromy Evans
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: