You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by he...@apache.org on 2007/04/19 17:02:44 UTC

svn commit: r530440 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

Author: hermanns
Date: Thu Apr 19 08:02:43 2007
New Revision: 530440

URL: http://svn.apache.org/viewvc?view=rev&rev=530440
Log:
FilterDispatcher not always calling ActionContextCleanUp.cleanUp(Request)
o applied patch submitted by Jasper Rosenberg

Issue Number: WW-1816

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java?view=diff&rev=530440&r1=530439&r2=530440
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/FilterDispatcher.java Thu Apr 19 08:02:43 2007
@@ -379,7 +379,6 @@
      */
     public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
 
-
         HttpServletRequest request = (HttpServletRequest) req;
         HttpServletResponse response = (HttpServletResponse) res;
         ServletContext servletContext = getServletContext();
@@ -394,7 +393,6 @@
             } catch (Exception ex) {
                 LOG.error("error getting ActionMapping", ex);
                 dispatcher.sendError(request, response, servletContext, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
-                ActionContextCleanUp.cleanUp(req);
                 return;
             }
 
@@ -417,14 +415,14 @@
                 return;
             }
 
+            dispatcher.serviceAction(request, response, servletContext, mapping);
+
+        } finally {
             try {
-                dispatcher.serviceAction(request, response, servletContext, mapping);
-            } finally {
                 ActionContextCleanUp.cleanUp(req);
+            } finally {
+                UtilTimerStack.pop(timerKey);
             }
-        }
-        finally {
-            UtilTimerStack.pop(timerKey);
         }
     }