--- old/src/java.base/share/classes/java/util/ResourceBundle.java 2017-08-18 15:03:12.986893612 -0700 +++ new/src/java.base/share/classes/java/util/ResourceBundle.java 2017-08-18 15:03:12.766883988 -0700 @@ -1210,15 +1210,15 @@ * Example: *
* The following class and property files are provided: - *
- * MyResources.class - * MyResources.properties - * MyResources_fr.properties - * MyResources_fr_CH.class - * MyResources_fr_CH.properties - * MyResources_en.properties - * MyResources_es_ES.class - *+ *
ResourceBundle
for the ".class" files,
@@ -1228,14 +1228,17 @@
* Calling getBundle
with the locale arguments below will
* instantiate resource bundles as follows:
*
- *
Locale | Resource bundle |
---|---|
Locale("fr", "CH") | MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class |
Locale("fr", "FR") | MyResources_fr.properties, parent MyResources.class |
Locale("de", "DE") | MyResources_en.properties, parent MyResources.class |
Locale("en", "US") | MyResources_en.properties, parent MyResources.class |
Locale("es", "ES") | MyResources_es_ES.class, parent MyResources.class |
Locale("fr", "CH") | MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class |
Locale("fr", "FR") | MyResources_fr.properties, parent MyResources.class |
Locale("de", "DE") | MyResources_en.properties, parent MyResources.class |
Locale("en", "US") | MyResources_en.properties, parent MyResources.class |
Locale("es", "ES") | MyResources_es_ES.class, parent MyResources.class |
Locale
format
Locale
format
Locale("de", "DE")
java.class
Locale("de", "DE")
java.class
Locale("de", "DE")
java.properties
Locale("de", "DE")
java.properties
Locale("de")
java.class
Locale("de")
java.class
Locale("de")
java.properties
Locale("de")
java.properties
Locale("")
java.class
Locale("")
java.class
Locale("")
java.properties
Locale("")
java.properties
bundleName
to the form required
+ * Converts the given {@code bundleName} to the form required
* by the {@link ClassLoader#getResource ClassLoader.getResource}
- * method by replacing all occurrences of '.'
in
- * bundleName
with '/'
and appending a
- * '.'
and the given file suffix
. For
- * example, if bundleName
is
- * "foo.bar.MyResources_ja_JP"
and suffix
- * is "properties"
, then
- * "foo/bar/MyResources_ja_JP.properties"
is returned.
+ * method by replacing all occurrences of {@code '.'} in
+ * {@code bundleName} with {@code '/'} and appending a
+ * {@code '.'} and the given file {@code suffix}. For
+ * example, if {@code bundleName} is
+ * {@code "foo.bar.MyResources_ja_JP"} and {@code suffix}
+ * is {@code "properties"}, then
+ * {@code "foo/bar/MyResources_ja_JP.properties"} is returned.
*
* @param bundleName
* the bundle name
@@ -3469,8 +3471,8 @@
* the file type suffix
* @return the converted resource name
* @exception NullPointerException
- * if bundleName
or suffix
- * is null
+ * if {@code bundleName} or {@code suffix}
+ * is {@code null}
*/
public final String toResourceName(String bundleName, String suffix) {
StringBuilder sb = new StringBuilder(bundleName.length() + 1 + suffix.length());