RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage [v2]
Alexander Matveev
almatvee at openjdk.org
Thu May 18 21:14:52 UTC 2023
On Mon, 15 May 2023 20:10:38 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> src/jdk.jpackage/share/classes/jdk/jpackage/internal/CLIHelp.java line 51:
>>
>>> 49: Log.info(I18N.getString("MSG_Help_no_args"));
>>> 50: } else {
>>> 51: OperatingSystem platform = OperatingSystem.current();
>>
>> Should we add if (Log.isVerbose) back? Otherwise default case in switch statement never executed.
>
> I was puzzled by that check early on and its still a puzzle. It seems a bit of a hack overloaded on the platform dispatch.
> As it turns out, the only time that `Log.isVerbose()` is true when `showHelp()` is called is when the environment variable `JPACKAGE_DEBUG` is used for debugging.
> `showHelp()` is only called before argument parsing is done and it doesn't look for --verbose. See `Main.execute()`
> So checking for isVerbose has no practical function.
Makes sense. Looks good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13586#discussion_r1198309008
More information about the core-libs-dev
mailing list