<i18n dev> RFR: 8342582: user.region for formatting number no longer works for 21.0.5 [v2]

Naoto Sato naoto at openjdk.org
Tue Oct 22 22:12:11 UTC 2024


On Tue, 22 Oct 2024 21:21:48 GMT, Justin Lu <jlu at openjdk.org> wrote:

> I think ideally the logic could stay in `Locale`, but since the fallback of _country/variant_format/display_ `StaticProperty` is based on user.region, it makes sense to move the logic to when the fallback is set.

Since `*_DISPLAY/FORMAT` static properties need to be calculated in `StaticProperty`, the override logic has to move in there.

> test/jdk/java/util/Locale/UserRegionTest.java line 31:
> 
>> 29:  * @modules jdk.localedata
>> 30:  * @run junit/othervm
>> 31:  *      -Duser.region=DE_POSIX
> 
> It might be nice to check the logic for all 3 cases: `country`, `country_variant`, or` _variant`.

Good point. Added all three cases.

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

PR Comment: https://git.openjdk.org/jdk/pull/21645#issuecomment-2430404191
PR Review Comment: https://git.openjdk.org/jdk/pull/21645#discussion_r1811500015


More information about the i18n-dev mailing list