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 <[email protected]>
  • Loading branch information
adnapibar authored and reta committed Nov 10, 2023
1 parent 3d508c4 commit 492a17e
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 492a17e

Please sign in to comment.