Skip to content

Commit

Permalink
Add condition to check JVM version for illegal-access switch (opensea…
Browse files Browse the repository at this point in the history
…rch-project#5279)

This switch is removed in JDK version 17. https://openjdk.org/jeps/403

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
  • Loading branch information
adnapibar authored Nov 16, 2022
1 parent 0be3afb commit fa6d36d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ public void execute(Task t) {
test.systemProperty("java.locale.providers", "SPI,JRE");
} else {
test.systemProperty("java.locale.providers", "SPI,COMPAT");
test.jvmArgs("--illegal-access=warn");
if (test.getJavaVersion().compareTo(JavaVersion.VERSION_17) < 0) {
test.jvmArgs("--illegal-access=warn");
}
}
if (test.getJavaVersion().compareTo(JavaVersion.VERSION_17) > 0) {
test.jvmArgs("-Djava.security.manager=allow");
Expand Down

0 comments on commit fa6d36d

Please sign in to comment.