[richfaces-svn-commits] JBoss Rich Faces SVN: r19007 - branches/RFPL-434/core/commons/src/main/java/org/richfaces/l10n.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Sun Aug 29 07:43:20 EDT 2010


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);



More information about the richfaces-svn-commits mailing list