diff -r 33de7752835c -r 94bb65cb37d3 src/java.base/share/classes/java/util/ResourceBundle.java --- a/src/java.base/share/classes/java/util/ResourceBundle.java Fri Sep 20 11:33:30 2019 +0800 +++ b/src/java.base/share/classes/java/util/ResourceBundle.java Fri Sep 20 11:07:52 2019 +0100 @@ -512,9 +512,9 @@ * * * @param key the key for the desired string - * @exception NullPointerException if key is null - * @exception MissingResourceException if no object for the given key can be found - * @exception ClassCastException if the object found for the given key is not a string + * @throws NullPointerException if key is null + * @throws MissingResourceException if no object for the given key can be found + * @throws ClassCastException if the object found for the given key is not a string * @return the string for the given key */ public final String getString(String key) { @@ -529,9 +529,9 @@ * * * @param key the key for the desired string array - * @exception NullPointerException if key is null - * @exception MissingResourceException if no object for the given key can be found - * @exception ClassCastException if the object found for the given key is not a string array + * @throws NullPointerException if key is null + * @throws MissingResourceException if no object for the given key can be found + * @throws ClassCastException if the object found for the given key is not a string array * @return the string array for the given key */ public final String[] getStringArray(String key) { @@ -547,8 +547,8 @@ * If still not successful, it throws a MissingResourceException. * * @param key the key for the desired object - * @exception NullPointerException if key is null - * @exception MissingResourceException if no object for the given key can be found + * @throws NullPointerException if key is null + * @throws MissingResourceException if no object for the given key can be found * @return the object for the given key */ public final Object getObject(String key) { @@ -841,9 +841,9 @@ * * * @param baseName the base name of the resource bundle, a fully qualified class name - * @exception java.lang.NullPointerException + * @throws java.lang.NullPointerException * if baseName is null - * @exception MissingResourceException + * @throws MissingResourceException * if no resource bundle for the specified base name can be found * @return a resource bundle for the given base name and the default locale * @@ -915,9 +915,9 @@ * the base name of the resource bundle, a fully qualified class name * @param locale * the locale for which a resource bundle is desired - * @exception NullPointerException + * @throws NullPointerException * if baseName or locale is null - * @exception MissingResourceException + * @throws MissingResourceException * if no resource bundle for the specified base name can be found * @return a resource bundle for the given base name and locale * @@ -1264,9 +1264,9 @@ * @param locale the locale for which a resource bundle is desired * @param loader the class loader from which to load the resource bundle * @return a resource bundle for the given base name and locale - * @exception java.lang.NullPointerException + * @throws java.lang.NullPointerException * if baseName, locale, or loader is null - * @exception MissingResourceException + * @throws MissingResourceException * if no resource bundle for the specified base name can be found * @since 1.2 * @revised 9 @@ -2250,7 +2250,7 @@ * by the given class loader. * * @param loader the class loader - * @exception NullPointerException if loader is null + * @throws NullPointerException if loader is null * @since 1.6 * @see ResourceBundle.Control#getTimeToLive(String,Locale) */ @@ -2271,7 +2271,7 @@ * object for the given key. * * @param key the key for the desired object - * @exception NullPointerException if key is null + * @throws NullPointerException if key is null * @return the object for the given key, or null */ protected abstract Object handleGetObject(String key); @@ -2293,7 +2293,7 @@ * @return true if the given key is * contained in this ResourceBundle or its * parent bundles; false otherwise. - * @exception NullPointerException + * @throws NullPointerException * if key is null * @since 1.6 */ @@ -2598,9 +2598,9 @@ * ResourceBundle.Control.getFormats method * @return a ResourceBundle.Control supporting the * specified formats - * @exception NullPointerException + * @throws NullPointerException * if formats is null - * @exception IllegalArgumentException + * @throws IllegalArgumentException * if formats is unknown */ public static final Control getControl(List formats) { @@ -2633,9 +2633,9 @@ * @return a ResourceBundle.Control supporting the * specified formats with no fallback * Locale support - * @exception NullPointerException + * @throws NullPointerException * if formats is null - * @exception IllegalArgumentException + * @throws IllegalArgumentException * if formats is unknown */ public static final Control getNoFallbackControl(List formats) { @@ -2679,7 +2679,7 @@ * name * @return a List of Strings containing * formats for loading resource bundles. - * @exception NullPointerException + * @throws NullPointerException * if baseName is null * @see #FORMAT_DEFAULT * @see #FORMAT_CLASS @@ -2866,7 +2866,7 @@ * the locale for which a resource bundle is desired * @return a List of candidate * Locales for the given locale - * @exception NullPointerException + * @throws NullPointerException * if baseName or locale is * null */ @@ -3034,7 +3034,7 @@ * @return a Locale for the fallback search, * or null if no further fallback search * is desired. - * @exception NullPointerException + * @throws NullPointerException * if baseName or locale * is null */ @@ -3127,29 +3127,29 @@ * false otherwise * @return the resource bundle instance, * or null if none could be found. - * @exception NullPointerException + * @throws NullPointerException * if bundleName, locale, * format, or loader is * null, or if null is returned by * {@link #toBundleName(String, Locale) toBundleName} - * @exception IllegalArgumentException + * @throws IllegalArgumentException * if format is unknown, or if the resource * found for the given parameters contains malformed data. - * @exception ClassCastException + * @throws ClassCastException * if the loaded class cannot be cast to ResourceBundle - * @exception IllegalAccessException + * @throws IllegalAccessException * if the class or its nullary constructor is not * accessible. - * @exception InstantiationException + * @throws InstantiationException * if the instantiation of a class fails for some other * reason. - * @exception ExceptionInInitializerError + * @throws ExceptionInInitializerError * if the initialization provoked by this method fails. - * @exception SecurityException + * @throws SecurityException * If a security manager is present and creation of new * instances is denied. See {@link Class#newInstance()} * for details. - * @exception IOException + * @throws IOException * if an error occurred when reading resources using * any I/O operations * @see java.util.spi.ResourceBundleProvider#getBundle(String, Locale) @@ -3295,7 +3295,7 @@ * {@link #TTL_NO_EXPIRATION_CONTROL} to disable the * expiration control, or {@link #TTL_DONT_CACHE} to disable * caching. - * @exception NullPointerException + * @throws NullPointerException * if baseName or locale is * null */ @@ -3350,7 +3350,7 @@ * in the cache * @return true if the expired bundle needs to be * reloaded; false otherwise. - * @exception NullPointerException + * @throws NullPointerException * if baseName, locale, * format, loader, or * bundle is null @@ -3437,7 +3437,7 @@ * the locale for which a resource bundle should be * loaded * @return the bundle name for the resource bundle - * @exception NullPointerException + * @throws NullPointerException * if baseName or locale * is null * @see java.util.spi.AbstractResourceBundleProvider#toBundleName(String, Locale) @@ -3495,7 +3495,7 @@ * @param suffix * the file type suffix * @return the converted resource name - * @exception NullPointerException + * @throws NullPointerException * if {@code bundleName} or {@code suffix} * is {@code null} */