On Thu, 2 Jul 2026 10:24:23 GMT, Kevin Walls <[email protected]> wrote:

>> Kieran Farrell has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   extend test coverage and code clean up
>
> src/hotspot/share/services/diagnosticCommand.hpp line 874:
> 
>> 872:     return "Print information similar to -XshowSettings, e.g. "
>> 873:            "'VM.show_settings locale' or 'VM.show_settings 
>> security:tls'.";
>> 874:   }
> 
> For the help, do we document all the options here, or say "See 'java -X' for 
> the list of -XshowSettings options".
> 
> Similarly, in ShowSettingsDCmd::execute() do we need to verify all the 
> section names, or can we leave that to the existing implementation?
> If we can avoid maintaining this list in more than one place, that would be 
> great.

Updating the help to direct to using java -X to get the options list sounds 
like a good idea.

However we cant leave validation of the section names up to the existing 
implementation in `LauncherHelper`  as `validateOption()` currently calls 
`abort()` for invalid options, which calls `System.exit(1)` which would shut 
down the live VM on which this jcmd would be used. One option would be to move 
the jcmd validation to `showSettingsBytes` of the `LauncherHelper` so at least 
both lists of valid sections are kept in the one class?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31742#discussion_r3513349563

Reply via email to