This is an automated email from the ASF dual-hosted git repository.
remm 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 132597fd40 Improve and add a todo
132597fd40 is described below
commit 132597fd405e49ebdeccf8096eb0a905bb112479
Author: remm <[email protected]>
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 4d40da80c8..6e5416694c 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 JreCompat {
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: [email protected]
For additional commands, e-mail: [email protected]