RFR: 8352184: Jtreg tests using CommandLineOptionTest.getVMTypeOption() and optionsvalidation.JVMOptionsUtils fail on static JDK [v3]
Jiangli Zhou
jiangli at openjdk.org
Wed Mar 26 19:36:11 UTC 2025
On Wed, 26 Mar 2025 17:47:46 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Looks basically fine, just nits:
Thanks for reviewing, @shipilev!
Please help re-approve after update.
> test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java line 56:
>
>> 54:
>> 55: /* Used to start the JVM with the same type as current */
>> 56: static String VMType = null;
>
> No need, `static`-s are implicitly initialized to `null`. Otherwise there is a style question why any other fields are not initialized! Maybe initialize it straight in `clinit`, like `GCType` is initialized.
Right, static field with reference type has null as the default value. Took your other suggestion in the `clinit` and remove `= null` here.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24171#issuecomment-2755551969
PR Review Comment: https://git.openjdk.org/jdk/pull/24171#discussion_r2014872570
More information about the hotspot-runtime-dev
mailing list