Remove unnecessary local variable.

This commit is contained in:
Luke Taylor 2010-08-24 20:29:25 +01:00
parent 5902c6b262
commit bf9d4a9747
1 changed files with 3 additions and 4 deletions

View File

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