Author: nbelaevski
Date: 2008-12-05 00:12:04 -0500 (Fri, 05 Dec 2008)
New Revision: 11571
Modified:
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
Log:
https://jira.jboss.org/jira/browse/RF-4847
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
===================================================================
---
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-12-05
03:00:30 UTC (rev 11570)
+++
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-12-05
05:12:04 UTC (rev 11571)
@@ -284,7 +284,16 @@
if (null == appBundle || null == locale) {
return null;
}
- ResourceBundle bundle = ResourceBundle.getBundle(appBundle, locale);
+
+ ResourceBundle bundle;
+
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ if (classLoader != null) {
+ bundle = ResourceBundle.getBundle(appBundle, locale, classLoader);
+ } else {
+ bundle = ResourceBundle.getBundle(appBundle, locale);
+ }
+
return bundle;
}