This is an automated email from the ASF dual-hosted git repository.
remm 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 6a3fc9b1c5 Fix possible NPE
6a3fc9b1c5 is described below
commit 6a3fc9b1c5bbac0a0252c6ceff82cd471d0d5668
Author: remm <[email protected]>
AuthorDate: Thu Sep 14 11:19:06 2023 +0200
Fix possible NPE
Found by coverity.
---
java/org/apache/catalina/startup/Tomcat.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/java/org/apache/catalina/startup/Tomcat.java
b/java/org/apache/catalina/startup/Tomcat.java
index e43f4095d8..3f60801212 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -385,6 +385,9 @@ public class Tomcat {
String servletClass) {
// will do class for name and set init params
Wrapper sw = ctx.createWrapper();
+ if (sw == null) {
+ return null;
+ }
sw.setServletClass(servletClass);
sw.setName(servletName);
ctx.addChild(sw);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]