Polishing

This commit is contained in:
Juergen Hoeller
2015-02-10 19:30:59 +01:00
parent 7585be85f3
commit 058714b03a
10 changed files with 36 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -394,6 +394,8 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
@Override
public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload)
throws IllegalAccessException, InstantiationException, IOException {
// Special handling of default encoding
if (format.equals("java.properties")) {
String bundleName = toBundleName(baseName, locale);
final String resourceName = toResourceName(bundleName, "properties");
@@ -441,6 +443,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
}
}
else {
// Delegate handling of "java.class" format to standard Control
return super.newBundle(baseName, locale, format, loader, reload);
}
}