On Tue, 26 Mar 2024 23:02:34 GMT, Justin Lu <j...@openjdk.org> wrote:

>> Please review this PR which updates two MessageFormat sub format related 
>> tests to be guaranteed to run under the `en_US` locale.
>> 
>> There exists locale that do not provide distinct instances for separate 
>> styles. For example, the `en_IN` locale provides the same LONG and SHORT 
>> compact number instances. The test data is built to test sub formats under 
>> the assumption that different styles do provide distinct instances.
>> 
>> As this is the case, these tests should be ran under a locale that does 
>> provide distinct instances for separate styles.
>
> Justin Lu has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   correct update

test/jdk/java/text/Format/MessageFormat/CompactSubFormats.java line 47:

> 45:     // This test expects an en_US locale, as this locale provides 
> distinct instances
> 46:     // for different styles.
> 47:     private static final Locale loc = Locale.of("en", "US");

No need to define this field. You can directly use the `Locale.US` constant in 
the constructor.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18498#discussion_r1540220164

Reply via email to