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 eeecbc4d6605a43d079509e6991f9b1a780852e3
Author: remm <[email protected]>
AuthorDate: Thu Nov 5 09:38:26 2026 +0100

    Java compatibility
---
 java/org/apache/catalina/core/NamingContextListener.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/NamingContextListener.java 
b/java/org/apache/catalina/core/NamingContextListener.java
index fce91c0511..faeb4b84eb 100644
--- a/java/org/apache/catalina/core/NamingContextListener.java
+++ b/java/org/apache/catalina/core/NamingContextListener.java
@@ -1110,7 +1110,8 @@ public class NamingContextListener implements 
LifecycleListener, PropertyChangeL
      *             position does not allow a stable unique name to be generated
      */
     protected String generatePoolName(ContextResource resource) {
-        if (container instanceof Context ctx) {
+        if (container instanceof Context) {
+            Context ctx = (Context) container;
             Container host = ctx.getParent();
             if (!(host instanceof Host)) {
                 // Without a Host above it, this context's position is not


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

Reply via email to