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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 019a08fd2e Null checks
019a08fd2e is described below

commit 019a08fd2e183b92474e72299f947789dcb7eb78
Author: remm <[email protected]>
AuthorDate: Thu May 21 16:39:56 2026 +0200

    Null checks
---
 java/org/apache/catalina/deploy/NamingResourcesImpl.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/java/org/apache/catalina/deploy/NamingResourcesImpl.java 
b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
index 3d18b8826f..87656e4414 100644
--- a/java/org/apache/catalina/deploy/NamingResourcesImpl.java
+++ b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
@@ -244,6 +244,10 @@ public class NamingResourcesImpl extends 
LifecycleMBeanBase implements Serializa
                 }
             } else if (rl != null) {
                 // Link. Need to look at the global resources
+                Server server = getServer();
+                if (server == null) {
+                    return;
+                }
                 NamingResourcesImpl global = 
getServer().getGlobalNamingResources();
                 if (global.findEnvironment(rl.getGlobal()) != null) {
                     if (global.findEnvironment(rl.getGlobal()).getOverride()) {


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

Reply via email to