RFR: 8276186: Require getAvailableLocales() methods to include Locale.ROOT
Pavel Rappo
prappo at openjdk.java.net
Wed Nov 10 18:37:34 UTC 2021
On Thu, 4 Nov 2021 16:07:01 GMT, Naoto Sato <naoto at openjdk.org> wrote:
> This fix is to require to include `Locale.ROOT` in the returned arrays/set from `getAvailableLocales()` methods in various locale-sensitive classes. The implementation has been including `Locale.ROOT` since its inception, it is simply a doc clarification (+ a test case verifying it). Corresponding CSR has also been drafted: https://bugs.openjdk.java.net/browse/JDK-8276249
The change to the existing source looks good, and the new test looks beautiful. Thanks for doing this.
src/java.base/share/classes/java/time/format/DecimalStyle.java line 118:
> 116: * Lists all the locales that are supported.
> 117: * <p>
> 118: * At a minimum, the returned Set must contain a {@code Locale} instance equal to
A nit, really. Consider applying either of these suggestions:
Suggestion:
* At a minimum, the returned {@code Set} must contain a {@code Locale} instance equal to
Suggestion:
* At a minimum, the returned set must contain a {@code Locale} instance equal to
-------------
Marked as reviewed by prappo (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6258
More information about the core-libs-dev
mailing list