From 4763f953d3bf6eb6fc42940d6120fbcfe807cace Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Fri, 11 Mar 2005 01:41:43 +0000 Subject: [PATCH] FilterChainProxy now supports replacement of ServletRequest and ServetResponse by Filter beans. --- .../java/org/acegisecurity/util/FilterChainProxy.java | 8 ++++---- doc/xdocs/changes.xml | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/util/FilterChainProxy.java b/core/src/main/java/org/acegisecurity/util/FilterChainProxy.java index ba365ed376..8a8609cbc3 100644 --- a/core/src/main/java/org/acegisecurity/util/FilterChainProxy.java +++ b/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); } } } diff --git a/doc/xdocs/changes.xml b/doc/xdocs/changes.xml index 518f6937cb..ef08df12e6 100644 --- a/doc/xdocs/changes.xml +++ b/doc/xdocs/changes.xml @@ -27,6 +27,7 @@ SecurityEnforcementFilter caused NullPointerException when anonymous authentication used with BasicProcessingFilterEntryPoint + FilterChainProxy now supports replacement of ServletRequest and ServetResponse by Filter beans ContextHolderAwareRequestWrapper methods returns null if user is anonymous