Skip to content

Commit e9f530c

Browse files
committed
make --sun-misc-unsafe-memory-access conditional on Java 23+
1 parent 6e35db0 commit e9f530c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ test {
114114

115115
// JVM flags for test compatibility with Java 17+
116116
jvmArgs '--add-opens=java.base/java.nio=ALL-UNNAMED', // Apache Arrow memory access
117-
'--enable-native-access=ALL-UNNAMED', // zstd-jni native loading
118-
'--sun-misc-unsafe-memory-access=allow' // parquet-hadoop CleanUtil (upstream unfixed)
117+
'--enable-native-access=ALL-UNNAMED' // zstd-jni native loading
118+
if (JavaVersion.current() >= JavaVersion.VERSION_23) {
119+
jvmArgs '--sun-misc-unsafe-memory-access=allow' // parquet-hadoop CleanUtil (upstream unfixed)
120+
}
119121

120122
inputs.dir "$distroDir/test_data"
121123
inputs.files("$distroDir/models", "$distroDir/config/default.groovy")

0 commit comments

Comments
 (0)