public ResourceBundleMessageInterpolator(ResourceBundleLocator userResourceBundleLocator, boolean cacheMessages) {
defaultLocale = Locale.getDefault();
if ( userResourceBundleLocator == null ) {
this.userResourceBundleLocator = new PlatformResourceBundleLocator( USER_VALIDATION_MESSAGES );
}
else {
this.userResourceBundleLocator = userResourceBundleLocator;
}
this.defaultResourceBundleLocator = new PlatformResourceBundleLocator( DEFAULT_VALIDATION_MESSAGES );
this.cachingEnabled = cacheMessages;
if ( cachingEnabled ) {
this.resolvedMessages = new ConcurrentReferenceHashMap<LocalizedMessage, String>(
DEFAULT_INITIAL_CAPACITY,