From d3c042f9a0cd91e7cdf7f45cb0ea387f7ba9785b Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 7 Nov 2024 15:31:17 +0000 Subject: [PATCH] 8343770: Build fails due to use of sun.misc.Unsafe in LoopOverRandom Reviewed-by: alanb --- .../org/openjdk/bench/java/lang/foreign/LoopOverRandom.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/micro/org/openjdk/bench/java/lang/foreign/LoopOverRandom.java b/test/micro/org/openjdk/bench/java/lang/foreign/LoopOverRandom.java index 7019973f6fe..9ee54f8ef6b 100644 --- a/test/micro/org/openjdk/bench/java/lang/foreign/LoopOverRandom.java +++ b/test/micro/org/openjdk/bench/java/lang/foreign/LoopOverRandom.java @@ -27,6 +27,7 @@ import java.lang.foreign.MemorySegment; import java.lang.foreign.ValueLayout; import java.util.Random; import java.util.concurrent.TimeUnit; + import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; @@ -38,7 +39,7 @@ import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.TearDown; -import sun.misc.Unsafe; +import jdk.internal.misc.Unsafe; @BenchmarkMode(Mode.AverageTime) @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)