From 5c520fc768f9e5006fc40181a63e1a7fa800d5d2 Mon Sep 17 00:00:00 2001 From: panos-kakos <102670093+panos-kakos@users.noreply.github.com> Date: Mon, 3 Apr 2023 20:27:36 +0300 Subject: [PATCH] [JAVA-18144] Moved jmh module to jdk9-and-above profile (#13725) * [JAVA-18144] Moved jmh module to jdk9-and-above profile * [JAVA-18144] Added configuration * [JAVA-18144] Upgraded dependencies * [JAVA-18144] Added compile argument --- jmh/pom.xml | 24 +++++++++++++------ .../com/baeldung/falsesharing/Striped64.java | 2 +- pom.xml | 4 ++-- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/jmh/pom.xml b/jmh/pom.xml index 61f62efd5a..6487b24ff4 100644 --- a/jmh/pom.xml +++ b/jmh/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 jmh 1.0-SNAPSHOT @@ -20,12 +20,12 @@ org.openjdk.jmh jmh-core - ${jmh-core.version} + 1.36 org.openjdk.jmh jmh-generator-annprocess - ${jmh-generator.version} + 1.36 org.openjdk.jol @@ -36,6 +36,15 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + + --add-exports=java.base/jdk.internal.vm.annotation=ALL-UNNAMED + + + org.apache.maven.plugins maven-jar-plugin @@ -76,9 +85,10 @@ - 3.0.2 - 0.10 - 3.2.0 + 3.3.0 + 0.17 + 3.5.0 + 3.11.0 \ No newline at end of file diff --git a/jmh/src/main/java/com/baeldung/falsesharing/Striped64.java b/jmh/src/main/java/com/baeldung/falsesharing/Striped64.java index 71c34a9de3..1cb55f3f4e 100644 --- a/jmh/src/main/java/com/baeldung/falsesharing/Striped64.java +++ b/jmh/src/main/java/com/baeldung/falsesharing/Striped64.java @@ -88,7 +88,7 @@ abstract class Striped64 extends Number { * JVM intrinsics note: It would be possible to use a release-only * form of CAS here, if it were provided. */ - @sun.misc.Contended static final class Cell { + @jdk.internal.vm.annotation.Contended static final class Cell { volatile long value; Cell(long x) { value = x; } final boolean cas(long cmp, long val) { diff --git a/pom.xml b/pom.xml index a812472113..d44b836607 100644 --- a/pom.xml +++ b/pom.xml @@ -358,7 +358,6 @@ jetbrains jhipster-5 - jmh language-interop libraries-3 @@ -555,7 +554,6 @@ java-jdi jhipster-5 - jmh language-interop libraries-3 @@ -813,6 +811,7 @@ data-structures ddd-contexts jackson-modules + jmh deeplearning4j docker-modules drools @@ -1063,6 +1062,7 @@ data-structures ddd-contexts jackson-modules + jmh deeplearning4j jmeter docker-modules