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 aa77cb2cc3 Improve and add a todo aa77cb2cc3 is described below commit aa77cb2cc39225a805f9be47bd8b992b62c4f2e7 Author: remm <r...@apache.org> AuthorDate: Fri Aug 4 22:04:01 2023 +0200 Improve and add a todo --- java/org/apache/tomcat/util/compat/Jre22Compat.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/compat/Jre22Compat.java b/java/org/apache/tomcat/util/compat/Jre22Compat.java index 7520310400..d685cd56ec 100644 --- a/java/org/apache/tomcat/util/compat/Jre22Compat.java +++ b/java/org/apache/tomcat/util/compat/Jre22Compat.java @@ -31,17 +31,21 @@ public class Jre22Compat extends Jre21Compat { static { + // FIXME: Improve check using a new class in 22 later Class<?> c1 = null; + Class<?> c2 = null; Method m1 = null; try { c1 = Class.forName("java.lang.foreign.MemorySegment"); + c2 = Class.forName("java.io.Console"); m1 = c1.getMethod("getString", long.class); + c2.getMethod("isTerminal"); } catch (ClassNotFoundException e) { // Must be pre-Java 22 log.debug(sm.getString("jre22Compat.javaPre22"), e); } catch (ReflectiveOperationException e) { - // Likely a previous API version + // Likely a previous Panama API version log.debug(sm.getString("jre22Compat.unexpected"), e); } hasPanama = (m1 != null); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org