Fixed when custom i18n props not specified

WW-1668


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@499704 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald J. Brown
2007-01-25 08:57:59 +00:00
parent bc6d851439
commit 35d43292cd
@@ -172,11 +172,13 @@ public class BeanSelectionProvider implements ConfigurationProvider {
// TODO: This should be moved to XWork after 2.0.4
// struts.custom.i18n.resources
try {
LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");
LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");
String bundles = props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
if (bundles != null && bundles.length() > 0) {
StringTokenizer customBundles = new StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES), ", ");
while (customBundles.hasMoreTokens()) {
String name = customBundles.nextToken();
try {
@@ -185,9 +187,7 @@ public class BeanSelectionProvider implements ConfigurationProvider {
} catch (Exception e) {
LOG.error("Could not find messages file " + name + ".properties. Skipping");
}
}
} catch (IllegalArgumentException e) {
// Assume it's OK, since many applications do not provide custom resource bundles.
}
}
}