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 2ac2486  Remove useless try/catch
2ac2486 is described below

commit 2ac2486d1c492956933ebec6e12910ec410c6355
Author: remm <r...@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 522e4a7..a640177 100644
--- a/java/org/apache/catalina/core/ApplicationDispatcher.java
+++ b/java/org/apache/catalina/core/ApplicationDispatcher.java
@@ -737,14 +737,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 f257de3..5acc88c 100644
--- a/java/org/apache/catalina/core/LocalStrings.properties
+++ b/java/org/apache/catalina/core/LocalStrings.properties
@@ -297,7 +297,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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to