소스 검색

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

Luke Taylor 18 년 전
부모
커밋
f7a6129657
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      core/src/main/java/org/acegisecurity/context/HttpSessionContextIntegrationFilter.java

+ 2 - 6
core/src/main/java/org/acegisecurity/context/HttpSessionContextIntegrationFilter.java

@@ -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