From da75e015b54f4ff011837995cacf80850411bb74 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 15 Apr 2024 15:11:40 +0000 Subject: [PATCH] 8330196: Make java/lang/invoke/defineHiddenClass/BasicTest release agnostic Reviewed-by: liach, mchung, jkuhn --- test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java index ce4f4f75906..2ca27be4248 100644 --- a/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java +++ b/test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,7 +78,8 @@ public class BasicTest { @BeforeTest static void setup() throws IOException { - compileSources(SRC_DIR, CLASSES_DIR, "--enable-preview", "--release", "23"); + compileSources(SRC_DIR, CLASSES_DIR, "--enable-preview", + "--release", Integer.toString(Runtime.version().feature())); hiddenClassBytes = Files.readAllBytes(CLASSES_DIR.resolve("HiddenClass.class")); // compile with --release 10 with no NestHost and NestMembers attribute