Skip to content

Commit da06c53

Browse files
authored
Fix thirdparty audit checks on Java 22 (#104010) (#104012)
1 parent 62f5579 commit da06c53

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
import static org.gradle.api.JavaVersion.VERSION_20;
6161
import static org.gradle.api.JavaVersion.VERSION_21;
62+
import static org.gradle.api.JavaVersion.VERSION_22;
6263

6364
@CacheableTask
6465
public abstract class ThirdPartyAuditTask extends DefaultTask {
@@ -338,8 +339,8 @@ private String runForbiddenAPIsCli() throws IOException {
338339
spec.setExecutable(javaHome.get() + "/bin/java");
339340
}
340341
spec.classpath(getForbiddenAPIsClasspath(), classpath);
341-
// Enable explicitly for each release as appropriate. Just JDK 20/21 for now, and just the vector module.
342-
if (isJavaVersion(VERSION_20) || isJavaVersion(VERSION_21)) {
342+
// Enable explicitly for each release as appropriate. Just JDK 20/21/22 for now, and just the vector module.
343+
if (isJavaVersion(VERSION_20) || isJavaVersion(VERSION_21) || isJavaVersion(VERSION_22)) {
343344
spec.jvmArgs("--add-modules", "jdk.incubator.vector");
344345
}
345346
spec.jvmArgs("-Xmx1g");

0 commit comments

Comments
 (0)