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

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

commit e3947842adcb20c82e8ee0e8342ef4960ef7ebe1
Author: remm <[email protected]>
AuthorDate: Wed Oct 14 15:55:38 2026 +0200

    Java compatibility
---
 .../org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java | 8 +++++++-
 java/org/apache/tomcat/util/descriptor/web/SecurityRoleRef.java   | 3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java 
b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java
index c5cb2fa80a..e287dcd34c 100644
--- a/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java
+++ b/java/org/apache/tomcat/util/collections/CaseInsensitiveKeyMap.java
@@ -149,7 +149,13 @@ public class CaseInsensitiveKeyMap<V> extends 
AbstractMap<String,V> {
     }
 
 
-    private record KeyIterator(Iterator<Key> iterator) implements 
Iterator<String> {
+    private static class KeyIterator implements Iterator<String> {
+
+        private final Iterator<Key> iterator;
+
+        KeyIterator(Iterator<Key> iterator) {
+            this.iterator = iterator;
+        }
 
         @Override
         public boolean hasNext() {
diff --git a/java/org/apache/tomcat/util/descriptor/web/SecurityRoleRef.java 
b/java/org/apache/tomcat/util/descriptor/web/SecurityRoleRef.java
index fd8164cab5..94f8a50606 100644
--- a/java/org/apache/tomcat/util/descriptor/web/SecurityRoleRef.java
+++ b/java/org/apache/tomcat/util/descriptor/web/SecurityRoleRef.java
@@ -124,9 +124,10 @@ public class SecurityRoleRef implements Serializable {
         if (this == obj) {
             return true;
         }
-        if (!(obj instanceof SecurityRoleRef other)) {
+        if (!(obj instanceof SecurityRoleRef)) {
             return false;
         }
+        SecurityRoleRef other = (SecurityRoleRef) obj;
         if (!Objects.equals(link, other.link)) {
             return false;
         }


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

Reply via email to