소스 검색

Remove unnecessary local variable.

Luke Taylor 15 년 전
부모
커밋
bf9d4a9747
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationEntryPoint.java

+ 3 - 4
web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationEntryPoint.java

@@ -49,10 +49,9 @@ public class BasicAuthenticationEntryPoint implements AuthenticationEntryPoint,
     }
 
     public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException)
-        throws IOException, ServletException {
-        HttpServletResponse httpResponse = (HttpServletResponse) response;
-        httpResponse.addHeader("WWW-Authenticate", "Basic realm=\"" + realmName + "\"");
-        httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());
+            throws IOException, ServletException {
+        response.addHeader("WWW-Authenticate", "Basic realm=\"" + realmName + "\"");
+        response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());
     }
 
     public String getRealmName() {