You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/05/15 12:08:05 UTC

[tomcat] branch master updated: Remove useless try/catch

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new fa64c99  Remove useless try/catch
fa64c99 is described below

commit fa64c995ca7484e30297e73e6db9dd389bf19cba
Author: remm <re...@apache.org>
AuthorDate: Fri May 15 14:07:52 2020 +0200

    Remove useless try/catch
    
    The ApplicationFilterChain release cannot throw an exception.
---
 java/org/apache/catalina/core/ApplicationDispatcher.java | 10 ++--------
 java/org/apache/catalina/core/LocalStrings.properties    |  1 -
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationDispatcher.java b/java/org/apache/catalina/core/ApplicationDispatcher.java
index 7f267e6..a718aa9 100644
--- a/java/org/apache/catalina/core/ApplicationDispatcher.java
+++ b/java/org/apache/catalina/core/ApplicationDispatcher.java
@@ -719,14 +719,8 @@ final class ApplicationDispatcher implements AsyncDispatcher, RequestDispatcher
         }
 
         // Release the filter chain (if any) for this request
-        try {
-            if (filterChain != null)
-                filterChain.release();
-        } catch (Throwable e) {
-            ExceptionUtils.handleThrowable(e);
-            wrapper.getLogger().error(sm.getString("standardWrapper.releaseFilters",
-                             wrapper.getName()), e);
-            // FIXME: Exception handling needs to be similar to what is in the StandardWrapperValue
+        if (filterChain != null) {
+            filterChain.release();
         }
 
         // Deallocate the allocated servlet instance
diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties
index dd9ec70..3498e00 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -296,7 +296,6 @@ standardWrapper.notClass=No servlet class has been specified for servlet [{0}]
 standardWrapper.notContext=Parent container of a Wrapper must be a Context
 standardWrapper.notFound=Servlet [{0}] is not available
 standardWrapper.notServlet=Class [{0}] is not a Servlet
-standardWrapper.releaseFilters=Release filters exception for servlet [{0}]
 standardWrapper.serviceException=Servlet.service() for servlet [{0}] in context with path [{1}] threw exception
 standardWrapper.serviceExceptionRoot=Servlet.service() for servlet [{0}] in context with path [{1}] threw exception [{2}] with root cause
 standardWrapper.unavailable=Marking servlet [{0}] as unavailable


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org