This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 19e50b41c5 Fix Gump failures
19e50b41c5 is described below

commit 19e50b41c5e0b6859390c5d3a8c20764bef27a06
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 27 10:06:38 2026 +0000

    Fix Gump failures
---
 .../org/apache/tomcat/util/compat/Jre25Compat.java | 40 ++++++++++++++++++++++
 java/org/apache/tomcat/util/compat/JreCompat.java  | 19 +++++++++-
 .../tribes/group/TestGroupChannelTlsFFM.java       |  2 +-
 3 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/compat/Jre25Compat.java 
b/java/org/apache/tomcat/util/compat/Jre25Compat.java
new file mode 100644
index 0000000000..32a5cf196d
--- /dev/null
+++ b/java/org/apache/tomcat/util/compat/Jre25Compat.java
@@ -0,0 +1,40 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.util.compat;
+
+/**
+ * JRE 25 compatibility implementation.
+ */
+public class Jre25Compat extends Jre22Compat {
+
+    /**
+     * Constructs a new Jre25Compat.
+     */
+    public Jre25Compat() {
+    }
+
+    private static final boolean supported;
+
+
+    static {
+        supported = Runtime.version().feature() > 24;
+    }
+
+    static boolean isSupported() {
+        return supported;
+    }
+}
diff --git a/java/org/apache/tomcat/util/compat/JreCompat.java 
b/java/org/apache/tomcat/util/compat/JreCompat.java
index 79e97050c7..2549b87ca5 100644
--- a/java/org/apache/tomcat/util/compat/JreCompat.java
+++ b/java/org/apache/tomcat/util/compat/JreCompat.java
@@ -30,6 +30,7 @@ public class JreCompat {
 
     private static final JreCompat instance;
     private static final boolean graalAvailable;
+    private static final boolean jre25Available;
     private static final boolean jre22Available;
 
     static {
@@ -46,11 +47,17 @@ public class JreCompat {
 
         // This is Tomcat 12.0.x with a minimum Java version of Java 21.
         // Look for the highest supported JVM first
-        if (Jre22Compat.isSupported()) {
+        if (Jre25Compat.isSupported()) {
+            instance = new Jre25Compat();
+            jre25Available = true;
+            jre22Available = true;
+        } else if (Jre22Compat.isSupported()) {
             instance = new Jre22Compat();
+            jre25Available = false;
             jre22Available = true;
         } else {
             instance = new JreCompat();
+            jre25Available = false;
             jre22Available = false;
         }
     }
@@ -84,4 +91,14 @@ public class JreCompat {
     public static boolean isJre22Available() {
         return jre22Available;
     }
+
+
+    /**
+     * Check if JRE 25 is available.
+     *
+     * @return {@code true} if JRE 25 is available
+     */
+    public static boolean isJre25Available() {
+        return jre25Available;
+    }
 }
diff --git a/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java 
b/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java
index df6c1036e3..6a386fe6f0 100644
--- a/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java
+++ b/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java
@@ -31,7 +31,7 @@ public class TestGroupChannelTlsFFM extends 
GroupChannelTlsTestBase {
 
     @Before
     public void setup() throws Exception {
-        Assume.assumeTrue("FFM requires Java 22+", 
JreCompat.isJre22Available());
+        Assume.assumeTrue("FFM support is compiled with Java 25+", 
JreCompat.isJre25Available());
         try {
             openSSLLibraryInit();
         } catch (Throwable t) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to