On Tue, 4 Aug 2026 02:25:54 GMT, by1361092 <[email protected]> wrote:

>> Please review this change. Thanks!
>> 
>> The launcher test Settings.java compares command output against expected 
>> text. The test was sensitive to the default locale because the expected 
>> output was assumed to be in English.
>> 
>> This change makes the test run with the en-US locale explicitly to ensure 
>> stable test results regardless of the default locale.
>> 
>> Testing:
>> - jtreg test/jdk/tools/launcher/Settings.java with LANG=zh_CN.utf8 and 
>> LC_ALL=zh_CN.utf8: passed.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> by1361092 has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains one new 
> commit since the last revision:
> 
>   8388366: Launcher test stability regardless of the default locale

Looks good to me.

test/jdk/tools/launcher/Settings.java line 343:

> 341:     private static TestResult doExecWithEnglishLocale(
> 342:         String command, String... args) {
> 343:         List<String> cmd = new ArrayList<>();

Allocating `String[args.length + 3]` and directly copying arguments into it 
would be simpler. Also, I'd prefer the method name as `doExecWithUSLocale`.

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

PR Review: https://git.openjdk.org/jdk/pull/32167#pullrequestreview-4867812523
PR Review Comment: https://git.openjdk.org/jdk/pull/32167#discussion_r3723256199

Reply via email to