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
The following commit(s) were added to refs/heads/9.0.x by this push:
new b7d7dd067e Fix NPE
b7d7dd067e is described below
commit b7d7dd067ea26bdb3126b72ec5b3a1a4d909b51a
Author: remm <[email protected]>
AuthorDate: Tue May 26 10:29:24 2026 +0200
Fix NPE
---
java/org/apache/catalina/startup/Tomcat.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/startup/Tomcat.java
b/java/org/apache/catalina/startup/Tomcat.java
index ad0719b26d..98243edecd 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -693,7 +693,7 @@ public class Tomcat {
public Context addWebapp(Host host, String contextPath, String docBase) {
LifecycleListener listener;
try {
- Class<?> clazz = Class.forName(host.getConfigClass());
+ Class<?> clazz = Class.forName((host != null ? host :
getHost()).getConfigClass());
listener = (LifecycleListener)
clazz.getConstructor().newInstance();
} catch (ReflectiveOperationException e) {
// Wrap in IAE since we can't easily change the method signature
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]