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 871edb1233 Fix NPE
871edb1233 is described below

commit 871edb1233e991da8a2fe4e313b6781229fa9776
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 9d444f83f6..cd816c3716 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -690,7 +690,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]

Reply via email to