Selaa lähdekoodia

FilterChainProxy now supports replacement of ServletRequest and ServetResponse by Filter beans.

Ben Alex 20 vuotta sitten
vanhempi
commit
4763f953d3

+ 4 - 4
core/src/main/java/org/acegisecurity/util/FilterChainProxy.java

@@ -289,7 +289,7 @@ public class FilterChainProxy implements Filter, InitializingBean,
 
         private VirtualFilterChain() {}
 
-        public void doFilter(ServletRequest arg0, ServletResponse arg1)
+        public void doFilter(ServletRequest request, ServletResponse response)
             throws IOException, ServletException {
             if (currentPosition == additionalFilters.length) {
                 if (logger.isDebugEnabled()) {
@@ -297,7 +297,7 @@ public class FilterChainProxy implements Filter, InitializingBean,
                         + " reached end of additional filter chain; proceeding with original chain");
                 }
 
-                fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
+                fi.getChain().doFilter(request, response);
             } else {
                 currentPosition++;
 
@@ -308,8 +308,8 @@ public class FilterChainProxy implements Filter, InitializingBean,
                         + additionalFilters[currentPosition - 1] + "'");
                 }
 
-                additionalFilters[currentPosition - 1].doFilter(fi.getRequest(),
-                    fi.getResponse(), this);
+                additionalFilters[currentPosition - 1].doFilter(request,
+                    response, this);
             }
         }
     }

+ 1 - 0
doc/xdocs/changes.xml

@@ -27,6 +27,7 @@
   <body>
     <release version="0.8.1" date="In CVS">
       <action dev="benalex" type="fix">SecurityEnforcementFilter caused NullPointerException when anonymous authentication used with BasicProcessingFilterEntryPoint</action>
+      <action dev="benalex" type="fix">FilterChainProxy now supports replacement of ServletRequest and ServetResponse by Filter beans</action>
       <action dev="benalex" type="update">ContextHolderAwareRequestWrapper methods returns null if user is anonymous</action>
     </release>
     <release version="0.8.0" date="2005-03-03">