This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new 6478ab72ac Fix possible NPE
6478ab72ac is described below
commit 6478ab72ac9f3521a4993dd7614fff6f8054cf20
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 84565ffe23..ef7023ea16 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -376,6 +376,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]