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 and reta committed Oct 30, 2023
1 parent 3d7aa59 commit 3912641
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,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");
}
}
}
});
Expand Down

0 comments on commit 3912641

Please sign in to comment.