From 27c5980a208a53aad5d3bde45d35ca2a568ce3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Mon, 14 Dec 2020 11:51:07 +0100 Subject: [PATCH] HHH-14371 Open java.base/java.nio.charset to the unnamed module in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NamingHelper test needs access to Charset.defaultCharset. Signed-off-by: Yoann Rodière --- hibernate-core/hibernate-core.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index 843e3297f3..184f1bd0da 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -239,6 +239,12 @@ artifacts { test { systemProperty 'file.encoding', 'utf-8' + + if ( gradle.ext.javaVersions.test.launcher.asInt() >= 9 ) { + // See org.hibernate.boot.model.naming.NamingHelperTest.DefaultCharset.set + jvmArgs( ['--add-opens', 'java.base/java.nio.charset=ALL-UNNAMED'] ) + } + beforeTest { descriptor -> //println "Starting test: " + descriptor }