Prechádzať zdrojové kódy

SEC-2805: Remove unnecessary cast in Http403ForbiddenEntryPoint

Rob Winch 10 rokov pred
rodič
commit
b04388ad62

+ 1 - 2
web/src/main/java/org/springframework/security/web/authentication/Http403ForbiddenEntryPoint.java

@@ -43,8 +43,7 @@ public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint {
         if (logger.isDebugEnabled()) {
             logger.debug("Pre-authenticated entry point called. Rejecting access");
         }
-        HttpServletResponse httpResponse = (HttpServletResponse) response;
-        httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied");
+        response.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied");
     }