Skip to content

Commit

Permalink
Fix thirdparty audit checks on Java 22 (elastic#104010)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Jan 5, 2024
1 parent e6cdaac commit 89c7d57
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

import static org.gradle.api.JavaVersion.VERSION_20;
import static org.gradle.api.JavaVersion.VERSION_21;
import static org.gradle.api.JavaVersion.VERSION_22;

@CacheableTask
public abstract class ThirdPartyAuditTask extends DefaultTask {
Expand Down Expand Up @@ -335,8 +336,8 @@ private String runForbiddenAPIsCli() throws IOException {
spec.setExecutable(javaHome.get() + "/bin/java");
}
spec.classpath(getForbiddenAPIsClasspath(), classpath);
// Enable explicitly for each release as appropriate. Just JDK 20/21 for now, and just the vector module.
if (isJavaVersion(VERSION_20) || isJavaVersion(VERSION_21)) {
// Enable explicitly for each release as appropriate. Just JDK 20/21/22 for now, and just the vector module.
if (isJavaVersion(VERSION_20) || isJavaVersion(VERSION_21) || isJavaVersion(VERSION_22)) {
spec.jvmArgs("--add-modules", "jdk.incubator.vector");
}
spec.jvmArgs("-Xmx1g");
Expand Down

0 comments on commit 89c7d57

Please sign in to comment.