From bf9d4a97470c679008ef6ce42681e3d0c1992636 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Tue, 24 Aug 2010 20:29:25 +0100 Subject: [PATCH] Remove unnecessary local variable. --- .../authentication/www/BasicAuthenticationEntryPoint.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationEntryPoint.java b/web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationEntryPoint.java index 9b7e59fa4e..35c26456c8 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/www/BasicAuthenticationEntryPoint.java +++ b/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() {