Author: nbelaevski
Date: 2010-08-29 07:43:19 -0400 (Sun, 29 Aug 2010)
New Revision: 19007
Modified:
branches/RFPL-434/core/commons/src/main/java/org/richfaces/l10n/BundleLoader.java
Log:
RFPL-434
Modified:
branches/RFPL-434/core/commons/src/main/java/org/richfaces/l10n/BundleLoader.java
===================================================================
---
branches/RFPL-434/core/commons/src/main/java/org/richfaces/l10n/BundleLoader.java 2010-08-29
04:38:11 UTC (rev 19006)
+++
branches/RFPL-434/core/commons/src/main/java/org/richfaces/l10n/BundleLoader.java 2010-08-29
11:43:19 UTC (rev 19007)
@@ -132,7 +132,7 @@
return viewRoot.getLocale();
}
- return Locale.getDefault();
+ return null;
}
protected ResourceBundle getOrCreateResourceBundle(BundleKey bundleKey) throws
MissingResourceException {
@@ -185,6 +185,11 @@
} else {
locale = Locale.getDefault();
}
+
+ if (locale == null) {
+ throw new MissingResourceException("Cannot read locale from
application",
+ getClass().getName(), messageKey.toString());
+ }
BundleKey bundleKey = new BundleKey(application.getMessageBundle(), locale);
return getOrCreateResourceBundle(bundleKey);
Show replies by date