You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2026/05/21 14:40:07 UTC
(tomcat) branch main updated: Null checks
This is an automated email from the ASF dual-hosted git repository.
rmaucher 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 3369f8904d Null checks
3369f8904d is described below
commit 3369f8904dbcf7dfad50f022f1d3d26b5162808d
Author: remm <re...@apache.org>
AuthorDate: Thu May 21 16:39:56 2026 +0200
Null checks
---
java/jakarta/security/auth/message/config/AuthConfigFactory.java | 3 ++-
java/org/apache/catalina/deploy/NamingResourcesImpl.java | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/java/jakarta/security/auth/message/config/AuthConfigFactory.java b/java/jakarta/security/auth/message/config/AuthConfigFactory.java
index 7d56046cf3..f8b740fde2 100644
--- a/java/jakarta/security/auth/message/config/AuthConfigFactory.java
+++ b/java/jakarta/security/auth/message/config/AuthConfigFactory.java
@@ -72,7 +72,8 @@ public abstract class AuthConfigFactory {
factory = (AuthConfigFactory) clazz.getConstructor().newInstance();
}
} catch (ReflectiveOperationException e) {
- throw new RuntimeException("AuthConfigFactory error:" + e.getCause().getMessage(), e.getCause());
+ Throwable cause = e.getCause() == null ? e : e.getCause();
+ throw new RuntimeException("AuthConfigFactory error:" + cause.getMessage(), cause);
}
}
}
diff --git a/java/org/apache/catalina/deploy/NamingResourcesImpl.java b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
index 3a9a796ca9..c07f572010 100644
--- a/java/org/apache/catalina/deploy/NamingResourcesImpl.java
+++ b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
@@ -246,6 +246,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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org