On Tue, 18 Aug 2026 07:50:39 GMT, Jaikiran Pai <[email protected]> wrote:
>> Hi all, >> >> This patch adds `--enable-preview` (and `--add-opens`) to several JMH >> benchmarks to avoid the error `java.lang.UnsupportedClassVersionError`. >> >> Best Regards, >> -- Guoxiong >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > test/micro/org/openjdk/bench/valhalla/array/read/HoistArrayChecks.java line > 34: > >> 32: @Warmup(iterations = 5, time = 1) >> 33: @Measurement(iterations = 5, time = 1) >> 34: @Fork(value = 3, jvmArgsAppend = {"--add-opens", >> "java.base/jdk.internal.value=ALL-UNNAMED", "--enable-preview"}) > > It's a surprise that this was ever functional without the `--add-opens` flag. Looking at the usage of `ValueClass` in this benchmark, shouldn't this be `--add-exports`, instead of `--add-opens`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32413#discussion_r3802194468
