<i18n dev> [jdk19] RFR: 8289252: Recommend Locale.of() method instead of the constructor

Roger Riggs rriggs at openjdk.org
Tue Jun 28 19:48:43 UTC 2022

On Tue, 28 Jun 2022 17:11:31 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> This is a leftover documentation fix to the deprecation of `Locale` constructors. `Locale.Builder` class had some texts that suggested using one of those constructors, which need to be replaced with a `Locale.of()` method. A corresponding CSR has also been drafted.

src/java.base/share/classes/java/util/Locale.java line 2608:

> 2606:      * <p>The following example shows how to obtain a {@code Locale} object
> 2607:      * using a {@code Builder}.
> 2608:      * {@snippet :

Style-wise, adding the language of the snippet would be a plus:

`@snippet lang=java :`


PR: https://git.openjdk.org/jdk19/pull/85

More information about the i18n-dev mailing list