<i18n dev> RFR: 8321206: Make Locale related system properties `StaticProperty` [v2]
Naoto Sato
naoto at openjdk.org
Wed Dec 6 20:55:49 UTC 2023
On Wed, 6 Dec 2023 18:10:05 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/util/StaticProperty.java line 415:
>>
>>> 413: public static String userRegion() {
>>> 414: return USER_REGION;
>>> 415: }
>>
>> Using methods to retrieve these makes is more complicated.
>> The bleeding of the enum values outside of Locale is undesirable.
>> Since the property values are final strings, I suggest just making the fields public and keep the mapping local to the Locale class.
>
> As Alan commented, I will not use `Locale.Category.ordinal()` but instead use the properties keys. Would that address your suggestion?
Ended up replacing public methods with public fields
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16986#discussion_r1417964470
More information about the i18n-dev
mailing list