svn commit: r1139882 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1139882 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java

doogie-3
Author: doogie
Date: Sun Jun 26 18:10:53 2011
New Revision: 1139882

URL: http://svn.apache.org/viewvc?rev=1139882&view=rev
Log:
OPTIMIZE: Remove use of HttpServletResponseWrapper.

Modified:
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java?rev=1139882&r1=1139881&r2=1139882&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java Sun Jun 26 18:10:53 2011
@@ -37,7 +37,6 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
 
 import javolution.util.FastList;
 
@@ -127,7 +126,7 @@ public class ContextFilter implements Fi
      */
     public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
         HttpServletRequest httpRequest = (HttpServletRequest) request;
-        HttpServletResponseWrapper wrapper = new HttpServletResponseWrapper((HttpServletResponse) response);
+        HttpServletResponse httpResponse = (HttpServletResponse) response;
 
         // Debug.logInfo("Running ContextFilter.doFilter", module);
 
@@ -185,7 +184,7 @@ public class ContextFilter implements Fi
                 if (!redirectAllTo.toLowerCase().startsWith("http")) {
                     redirectAllTo = httpRequest.getContextPath() + redirectAllTo;
                 }
-                wrapper.sendRedirect(redirectAllTo);
+                httpResponse.sendRedirect(redirectAllTo);
                 return;
             } else {
                 httpRequest.getSession().removeAttribute("_FORCE_REDIRECT_");
@@ -261,13 +260,13 @@ public class ContextFilter implements Fi
                         }
                     }
                     filterMessage = filterMessage + " (" + error + ")";
-                    wrapper.sendError(error, contextUri);
+                    httpResponse.sendError(error, contextUri);
                 } else {
                     filterMessage = filterMessage + " (" + redirectPath + ")";
                     if (!redirectPath.toLowerCase().startsWith("http")) {
                         redirectPath = httpRequest.getContextPath() + redirectPath;
                     }
-                    wrapper.sendRedirect(redirectPath);
+                    httpResponse.sendRedirect(redirectPath);
                 }
                 Debug.logWarning(filterMessage, module);
                 return;