From ad814027918e2641a2d88025d6c92ba7a1dcd5c1 Mon Sep 17 00:00:00 2001 From: Chris Hegarty <62058229+ChrisHegarty@users.noreply.github.com> Date: Thu, 22 Aug 2024 13:51:32 +0100 Subject: [PATCH] Support JDK 23 in Panama Vectorization Provider (#13678) This commit updates the Vectorization Provider to support JDK 23. The API has not changed so the changes minimally bump the major JDK check, and enable the incubating API during testing --- build.gradle | 2 +- lucene/CHANGES.txt | 2 ++ .../lucene/internal/vectorization/VectorizationProvider.java | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1c7c5f817aa..d406f237541 100644 --- a/build.gradle +++ b/build.gradle @@ -81,7 +81,7 @@ ext { minJavaVersion = JavaVersion.toVersion(deps.versions.minJava.get()) // also change this in extractor tool: ExtractForeignAPI - vectorIncubatorJavaVersions = [ JavaVersion.VERSION_21, JavaVersion.VERSION_22 ] as Set + vectorIncubatorJavaVersions = [ JavaVersion.VERSION_21, JavaVersion.VERSION_22, JavaVersion.VERSION_23 ] as Set // snapshot build marker used in scripts. snapshotBuild = version.contains("SNAPSHOT") diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index f3190bed92a..7b5d7d94c04 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -299,6 +299,8 @@ New Features * GITHUB#13568: Add sandbox facets module to compute facets while collecting. (Egor Potemkin, Shradha Shankar) +* GITHUB#13678: Add support JDK 23 to the Panama Vectorization Provider. (Chris Hegarty) + Improvements --------------------- diff --git a/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java b/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java index 46dabb3427e..2a6365297c8 100644 --- a/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java +++ b/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java @@ -108,7 +108,7 @@ public abstract class VectorizationProvider { static VectorizationProvider lookup(boolean testMode) { final int runtimeVersion = Runtime.version().feature(); assert runtimeVersion >= 21; - if (runtimeVersion <= 22) { + if (runtimeVersion <= 23) { // only use vector module with Hotspot VM if (!Constants.IS_HOTSPOT_VM) { LOG.warning(