On Tue, 18 Aug 2026 07:15:17 GMT, Guoxiong Li <[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/sandbox/corelibs/mapprotos/HashMapBench.java
 line 58:

> 56: @BenchmarkMode(Mode.AverageTime)
> 57: @OutputTimeUnit(TimeUnit.MILLISECONDS)
> 58: @Fork(value = 1, jvmArgsAppend = {"--enable-preview"})

I see that there's a different `HashMapBench.java` at 
`test/micro/org/openjdk/bench/java/util/HashMapBench.java`. Do you know how 
this benchmark differs from the other and why this is a separate file? Plus, 
the directory names of these benchmarks all have `valhalla/sandbox`. It's not 
clear if these are leftover benchmarks or whether these are still relevant.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32413#discussion_r3802108377

Reply via email to