On Thu, 13 Aug 2026 01:17:18 GMT, Guanqiang Han <[email protected]> wrote:
>> test/jdk/java/lang/Object/FinalizationOption.java line 123: >> >>> 121: return; >>> 122: } >>> 123: >> >> Updating `main()` like this seems unnecessary. >> Can't this be done just by adding a couple `@run` options? >> E.g.: >> >> * @run main/othervm --finalization enabled FinalizationOption yes >> * @run main/othervm --finalization disabled FinalizationOption no > > Thanks for the suggestion. I used `ProcessTools.executeTestJava()` because > `@run main/othervm --finalization enabled FinalizationOption yes` would cause > jtreg to treat `enabled` as the test class, so the whitespace-separated form > needs to be launched explicitly here. The changes means that FinalizationOption is run directly by jtreg and launched by the test itself. Brent - what would you think about always launching, e.g. @run main FinalizationOption disabled form1 @run main FinalizationOption disabled form2 @run main FinalizationOption enabled form1 @run main FinalizationOption enabled form2 or some variation. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31928#discussion_r3774933643
