RFR: 7904141: JTReg should support running compact source files
Jaikiran Pai
jpai at openjdk.org
Sun Feb 1 12:17:37 UTC 2026
On Thu, 29 Jan 2026 10:45:15 GMT, Christian Stein <cstein at openjdk.org> wrote:
> Please review this change that adds support for running compact source files 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`
src/share/classes/com/sun/javatest/regtest/agent/MainWrapper.java line 184:
> 182:
> 183: // RUN JAVA PROGRAM
> 184: Class<?> mainClass = Class.forName(className, false, cl);
Hello Christian, I haven't yet looked at the changes in detail, but I think this change here should be guarded by a check against the current runtime version. i.e. something like:
if (currentRuntimeVersion < 25) {
Class<?> c = Class.forName(className, false, cl);
Method mainMethod = c.getMethod("main", String[].class);
mainMethod.invoke(null, (Object) args);
} else {
... // the new changes proposed in this PR
}
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/313#discussion_r2751142862
More information about the jtreg-dev
mailing list