[code-reflection] RFR: Test java version check we do in op building methods [v5]

Paul Sandoz psandoz at openjdk.org
Thu Dec 18 22:35:46 UTC 2025


On Thu, 18 Dec 2025 21:23:39 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

>> Write test to make sure java version check we do before building models is working.
>> There are other options to do the test, one in particular is passing the java compile time version as option and update the OpBuilder to accept the feature version we test against.
>
> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Assert that calling Op.ofMethod multiple times will throw the same exception

test/jdk/java/lang/reflect/code/writer/TestJavaVersionCheckerForMethods.java line 35:

> 33:     void test() throws ReflectiveOperationException, IOException {
> 34:         Method m = this.getClass().getDeclaredMethod("max", int.class, int.class);
> 35:         int n = new Random().nextInt(2, 10);

There's no need to be random, just do it twice.

-------------

PR Review Comment: https://git.openjdk.org/babylon/pull/748#discussion_r2632855354


More information about the babylon-dev mailing list