RFR: 7904141: JTReg should support running compact source files [v6]
Jaikiran Pai
jpai at openjdk.org
Wed Feb 18 15:25:42 UTC 2026
On Mon, 16 Feb 2026 09:05:50 GMT, Christian Stein <cstein at openjdk.org> wrote:
>> Please review this change that adds support for running [JEP 512: Compact Source Files and Instance Main Methods](https://openjdk.org/jeps/512) as jtreg `main` tests.
>>
>> This pull request also adds JDK 25 to the GHA-based CI workflow and updates to use newer GitHub actions: `actions/checkout at v6` and `actions/setup-java at v5`
>
> Christian Stein has updated the pull request incrementally with one additional commit since the last revision:
>
> Environment variable already exported
src/share/classes/com/sun/javatest/regtest/agent/MainMethodHelper.java line 46:
> 44:
> 45: // Similar to sun.launcher.LauncherHelper#executeMainClass
> 46: static void executeMainClass(Class<?> mainClass, String[] classArgs) throws
I think we should rename the second param to `mainMethodArgs`.
src/share/classes/com/sun/javatest/regtest/agent/MainMethodHelper.java line 117:
> 115: System.err.println();
> 116: AStatus.error("Can't create an instance of: " + e).exit();
> 117: return null; // unreachable
Given that `createMainInstanceOrNull(...)` is a utility method that could be called from various places, I think we shouldn't `exit()` from here and instead should just propagate any exceptions and let the call site(s) decide what has to be done.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/313#discussion_r2822875353
PR Review Comment: https://git.openjdk.org/jtreg/pull/313#discussion_r2822887598
More information about the jtreg-dev
mailing list