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

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

commit fab4dfc2f3bf41aa4958614acf4f7b6380b79f8c
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 fb9b97031a..10de4189c0 100644
--- a/java/org/apache/catalina/core/NamingContextListener.java
+++ b/java/org/apache/catalina/core/NamingContextListener.java
@@ -1129,7 +1129,8 @@ public class NamingContextListener implements 
LifecycleListener, ContainerListen
      *             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