This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 87091cedc0 Throw an ISE instead of return null 87091cedc0 is described below commit 87091cedc058204424a2b18368b4756564797e66 Author: remm <r...@apache.org> 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 4eb1e10f1f..71d8bf1f9e 100644 --- a/java/org/apache/catalina/startup/Tomcat.java +++ b/java/org/apache/catalina/startup/Tomcat.java @@ -384,7 +384,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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org