From 0444353084f7c47bb29e785b10cf3e835454c2da Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Tue, 3 Dec 2024 09:45:25 +0100 Subject: [PATCH] Fix Maven integration tests on JDK 24 (cherry picked from commit 35a3fd68f4226f6fe7d4ea42255a999402a07484) --- .../java/platform/tooling/support/tests/MavenEnvVars.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java index bcec609010a0..eebfc4ffd58f 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenEnvVars.java @@ -16,9 +16,11 @@ final class MavenEnvVars { - // https://issues.apache.org/jira/browse/MNG-8248 static final Map FOR_JDK24_AND_LATER = JRE.currentVersion().compareTo(JRE.JAVA_24) >= 0 // - ? Map.of("MAVEN_OPTS", "--enable-native-access=ALL-UNNAMED") // + ? Map.of("MAVEN_OPTS", String.join(" ", // + "--enable-native-access=ALL-UNNAMED", // https://issues.apache.org/jira/browse/MNG-8248 + "--sun-misc-unsafe-memory-access=allow" // https://issues.apache.org/jira/browse/MNG-8399 + )) // : Map.of(); private MavenEnvVars() {