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

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new a3255b5e93 Explain the Java 22 check
a3255b5e93 is described below

commit a3255b5e93ae21751ab12ec048743b5fd0b8e032
Author: remm <r...@apache.org>
AuthorDate: Mon Feb 26 16:41:04 2024 +0100

    Explain the Java 22 check
---
 java/org/apache/tomcat/util/compat/Jre22Compat.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/compat/Jre22Compat.java 
b/java/org/apache/tomcat/util/compat/Jre22Compat.java
index 3bd43dd141..fd45c20bd6 100644
--- a/java/org/apache/tomcat/util/compat/Jre22Compat.java
+++ b/java/org/apache/tomcat/util/compat/Jre22Compat.java
@@ -25,10 +25,13 @@ public class Jre22Compat extends Jre21Compat {
     private static final Log log = LogFactory.getLog(Jre22Compat.class);
     private static final StringManager sm = 
StringManager.getManager(Jre22Compat.class);
 
-    private static final boolean hasPanama;
+    private static final boolean supported;
 
 
     static {
+        // Note: FFM is the main new feature from Java 22, but it was 
previously
+        // present as a preview. As a result, it is more accurate to test for 
another
+        // new class
         Class<?> c1 = null;
         try {
             c1 = Class.forName("java.text.ListFormat");
@@ -36,11 +39,11 @@ public class Jre22Compat extends Jre21Compat {
             // Must be pre-Java 22
             log.debug(sm.getString("jre22Compat.javaPre22"), e);
         }
-        hasPanama = (c1 != null);
+        supported = (c1 != null);
     }
 
     static boolean isSupported() {
-        return hasPanama;
+        return supported;
     }
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to