On Fri, 14 Jul 2023 11:21:02 GMT, Sean Coffey <coff...@openjdk.org> wrote:

>> Simple tweak to remove the "available locales" section from default 
>> `-XshowSettings` output.
>> 
>> Instead, it remains available with the `-XshowSettings:locale` option
>
> Sean Coffey has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   review feedback and bug id added to test

src/java.base/share/classes/sun/launcher/LauncherHelper.java line 173:

> 171:                 break;
> 172:             case "locale":
> 173:                 printLocale(false);

Adding the flag seems to make the coding more complex.
I'd remove the printing of all locales from the printLocale method (and maybe 
rename it to printLocalSummary).
And add the printing of the help test for the the verbose here also.

src/java.base/share/classes/sun/launcher/LauncherHelper.java line 187:

> 185:                 printVmSettings(initialHeapSize, maxHeapSize, stackSize);
> 186:                 printProperties();
> 187:                 printLocale(true);

Here: call `printLocaleSummary()` and then `printLocales()` and println.

src/java.base/share/classes/sun/launcher/LauncherHelper.java line 283:

> 281:      * prints the locale subopt/section
> 282:      */
> 283:     private static void printLocale(boolean summaryMode) {

Rename to printLocaleSummary (without an argument) and just print the summary.
(No help).
And drop the printing of the locales.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14885#discussion_r1263865162
PR Review Comment: https://git.openjdk.org/jdk/pull/14885#discussion_r1263865996
PR Review Comment: https://git.openjdk.org/jdk/pull/14885#discussion_r1263870691

Reply via email to