Skip to content

Commit 2134a1e

Browse files
authored
Remove pesky restricted method warnings in tests. (#128212)
Since our unit and IT tests run as unnamed modules we should add `--enable-native-access=ALL-UNNAMED` to suppress the pesky warning that arise from calls to `System::load`.
1 parent 0a46527 commit 2134a1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchTestBasePlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public void execute(Task t) {
120120
"--add-opens=java.base/java.nio.file=ALL-UNNAMED",
121121
"--add-opens=java.base/java.time=ALL-UNNAMED",
122122
"--add-opens=java.management/java.lang.management=ALL-UNNAMED",
123+
"--enable-native-access=ALL-UNNAMED",
123124
"-XX:+HeapDumpOnOutOfMemoryError"
124125
);
125126

0 commit comments

Comments
 (0)