On Wed, 6 Dec 2023 18:10:05 GMT, Naoto Sato <na...@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

Reply via email to