Skip to content

Commit 5b76f73

Browse files
committed
[Java] Add module opens to avoid warnings on reflective access.
1 parent 5f658a2 commit 5b76f73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ subprojects {
154154
}
155155

156156
test {
157+
if (JavaVersion.current().ordinal() >= JavaVersion.VERSION_1_9.ordinal()) {
158+
jvmArgs('--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED')
159+
jvmArgs('--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED')
160+
}
161+
157162
testLogging {
158163
showStandardStreams = true
159164
exceptionFormat = 'full'

0 commit comments

Comments
 (0)