SEC-539: Removed unnecessary check for a null request object. Removed unnecessary catch/rethrow of IOException and ServletException from try/finally around chain.doFilter.

This commit is contained in:
Luke Taylor 2007-08-28 22:40:56 +00:00
parent d1be9f9980
commit f7a6129657
1 changed files with 2 additions and 6 deletions

View File

@ -192,7 +192,7 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean, Fi
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
if ((request != null) && (request.getAttribute(FILTER_APPLIED) != null)) {
if (request.getAttribute(FILTER_APPLIED) != null) {
// ensure that filter is only applied once per request
chain.doFilter(request, response);
@ -235,14 +235,10 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean, Fi
request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
// Proceed with chain
// Proceed with chain
try {
chain.doFilter(request, response);
} catch (IOException ioe) {
throw ioe;
} catch (ServletException se) {
throw se;
}
finally {
// This is the only place in this class where SecurityContextHolder.getContext() is called