[
https://issues.apache.org/struts/browse/WW-2511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jeromy Evans resolved WW-2511.
------------------------------
Resolution: Fixed
Fix Version/s: 2.1.1
Committed change and created basic unit test
> i18n tag never calls getTexts(bundleName) of TextProvider
> ---------------------------------------------------------
>
> Key: WW-2511
> URL: https://issues.apache.org/struts/browse/WW-2511
> Project: Struts 2
> Issue Type: Bug
> Components: Other
> Affects Versions: 2.0.11, 2.1.1
> Reporter: Jeromy Evans
> Priority: Minor
> Fix For: 2.1.1
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.