* @return the resource bundle or <code>null</code> if none is found.
*/
public ResourceBundle getResourceBundle(Locale locale) {
ResourceBundle rb = null;
boolean isSecured = System.getSecurityManager() != null;
GetClassLoader action = GetClassLoader.fromContext();
ClassLoader classLoader = isSecured ? AccessController
.doPrivileged( action ) : action.run();
if ( classLoader != null ) {
rb = loadBundle(
classLoader, locale, bundleName
+ " not found by thread local classloader"
);
}
if ( rb == null ) {
action = GetClassLoader
.fromClass( ResourceBundleMessageInterpolator.class );
classLoader = isSecured ? AccessController.doPrivileged( action )
: action.run();
rb = loadBundle(
classLoader, locale, bundleName
+ " not found by validator classloader"
);
}