From 3d115ab7eec178b830f374ba24bdf37f588b61c7 Mon Sep 17 00:00:00 2001 From: Andre Onuki Date: Fri, 6 Oct 2023 16:30:33 -0400 Subject: [PATCH] Bytebuddy flag for java 21 Some add-opens for vertx tests --- gradle/script/java.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle/script/java.gradle b/gradle/script/java.gradle index 93a1011c1e..9c75687d44 100644 --- a/gradle/script/java.gradle +++ b/gradle/script/java.gradle @@ -108,9 +108,6 @@ test { configuredWithValidTestJDK() } - // mockito uses a version of bytebuddy that does not support Java 21, but allows it with this flag - systemProperty("net.bytebuddy.experimental", "true") - ext.configureTest = { String jdkName, Closure configuration -> // Add an input property so that we differentiate between JDKs with the same version inputs.property("test.jdk", jdkName) @@ -126,13 +123,17 @@ test { '--add-opens=java.base/java.util=ALL-UNNAMED', '--add-opens=java.base/java.net=ALL-UNNAMED', '--add-opens=java.base/java.io=ALL-UNNAMED', + '--add-opens=java.base/java.nio=ALL-UNNAMED', '--add-opens=java.base/sun.net.spi=ALL-UNNAMED', + '--add-opens=java.base/sun.nio.ch=ALL-UNNAMED', '--add-exports=java.base/sun.net.spi=ALL-UNNAMED', '--add-exports=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED' useJUnit { excludeCategories 'com.newrelic.test.marker.Java21IncompatibleTest' } } + // mockito uses a version of bytebuddy that has experimental support for Java 21 + systemProperty("net.bytebuddy.experimental", "true") } if (project.hasProperty("test17")) { configureTest("jdk17") {