<i18n dev> RFR: 8283698: Refactor Locale constructors used in src/test

Joe Wang joehw at openjdk.java.net
Thu Apr 7 00:31:55 UTC 2022


On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`.

test/jdk/java/text/Format/NumberFormat/CurrencyFormat.java line 63:

> 61:             Locale.of("it", "IT", "EURO"),
> 62:             Locale.forLanguageTag("de-AT"),
> 63:             Locale.forLanguageTag("fr-CH"),

Use the new factory? Ok not to change as these are tests and there are too many of them. It's not deprecated anyways.

test/jdk/java/text/Format/common/Bug6215962.java line 58:

> 56:         check(mf1, mf2, false);
> 57: 
> 58:         mf1 = new MessageFormat("{0}", Locale.of("ja", "JP"));

Locale.JAPAN?

-------------

PR: https://git.openjdk.java.net/jdk/pull/8130


More information about the i18n-dev mailing list