This is an automated email from the ASF dual-hosted git repository.
remm 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 3fe81486ef Throw an ISE instead of return null
3fe81486ef is described below
commit 3fe81486eff27d54face3310ba28cc4b5ee576e0
Author: remm <[email protected]>
AuthorDate: Tue Jan 16 16:38:13 2024 +0100
Throw an ISE instead of return null
Found by coverity.
---
java/org/apache/catalina/startup/LocalStrings.properties | 1 +
java/org/apache/catalina/startup/Tomcat.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/startup/LocalStrings.properties
b/java/org/apache/catalina/startup/LocalStrings.properties
index facc17c182..5abd648a71 100644
--- a/java/org/apache/catalina/startup/LocalStrings.properties
+++ b/java/org/apache/catalina/startup/LocalStrings.properties
@@ -159,6 +159,7 @@ tomcat.homeDirMakeFail=Unable to create the directory [{0}]
to use as the home d
tomcat.invalidCommandLine=Invalid command line arguments [{0}]
tomcat.noContextClass=Failed to instantiate context class [{0}] for host [{1}]
and url [{2}]
tomcat.noContextXml=Unable to determine web application context.xml [{0}]
+tomcat.noWrapper=Failed to create wrapper
userConfig.database=Exception loading user database
userConfig.deploy=Deploying web application for user [{0}]
diff --git a/java/org/apache/catalina/startup/Tomcat.java
b/java/org/apache/catalina/startup/Tomcat.java
index 716758c5b5..d39bb8d928 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -385,7 +385,7 @@ public class Tomcat {
// will do class for name and set init params
Wrapper sw = ctx.createWrapper();
if (sw == null) {
- return null;
+ throw new IllegalStateException(sm.getString("tomcat.noWrapper"));
}
sw.setServletClass(servletClass);
sw.setName(servletName);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]