8276186: Require getAvailableLocales() methods to include Locale.ROOT

Reviewed-by: prappo, smarks, iris
This commit is contained in:
Naoto Sato 2021-11-10 20:52:11 +00:00
parent df02daa6f9
commit 0c409cac78
10 changed files with 108 additions and 22 deletions

View file

@ -1126,8 +1126,9 @@ public final class Locale implements Cloneable, Serializable {
* The returned array represents the union of locales supported
* by the Java runtime environment and by installed
* {@link java.util.spi.LocaleServiceProvider LocaleServiceProvider}
* implementations. It must contain at least a {@code Locale}
* instance equal to {@link java.util.Locale#US Locale.US}.
* implementations. At a minimum, the returned array must contain a
* {@code Locale} instance equal to {@link Locale#ROOT Locale.ROOT} and
* a {@code Locale} instance equal to {@link Locale#US Locale.US}.
*
* @return An array of installed locales.
*/