From e7486fc203200ea922712a5195f4a2f140bb74df Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Mon, 14 Sep 2009 16:06:15 +0000 Subject: [PATCH] Removed Ordered interface from Http403EntryPoint (unused). --- .../Http403ForbiddenEntryPoint.java | 17 +++-------------- ...ava => Http403ForbiddenEntryPointTests.java} | 14 +------------- 2 files changed, 4 insertions(+), 27 deletions(-) rename web/src/test/java/org/springframework/security/web/authentication/preauth/{PreAuthenticatedProcessingFilterEntryPointTests.java => Http403ForbiddenEntryPointTests.java} (76%) diff --git a/web/src/main/java/org/springframework/security/web/authentication/Http403ForbiddenEntryPoint.java b/web/src/main/java/org/springframework/security/web/authentication/Http403ForbiddenEntryPoint.java index 8e2351a75c..65e85d5556 100755 --- a/web/src/main/java/org/springframework/security/web/authentication/Http403ForbiddenEntryPoint.java +++ b/web/src/main/java/org/springframework/security/web/authentication/Http403ForbiddenEntryPoint.java @@ -1,8 +1,5 @@ package org.springframework.security.web.authentication; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.AuthenticationEntryPoint; - import java.io.IOException; import javax.servlet.ServletException; @@ -11,7 +8,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.core.Ordered; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; /** *

@@ -34,11 +32,9 @@ import org.springframework.core.Ordered; * @author Ruud Senden * @since 2.0 */ -public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint, Ordered { +public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint { private static final Log logger = LogFactory.getLog(Http403ForbiddenEntryPoint.class); - private int order = Integer.MAX_VALUE; - /** * Always returns a 403 error code to the client. */ @@ -51,12 +47,5 @@ public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint, Ord httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied"); } - public int getOrder() { - return order; - } - - public void setOrder(int i) { - order = i; - } } diff --git a/web/src/test/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedProcessingFilterEntryPointTests.java b/web/src/test/java/org/springframework/security/web/authentication/preauth/Http403ForbiddenEntryPointTests.java similarity index 76% rename from web/src/test/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedProcessingFilterEntryPointTests.java rename to web/src/test/java/org/springframework/security/web/authentication/preauth/Http403ForbiddenEntryPointTests.java index ab4f56ec9c..f5e07403cf 100755 --- a/web/src/test/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedProcessingFilterEntryPointTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/preauth/Http403ForbiddenEntryPointTests.java @@ -13,18 +13,7 @@ import junit.framework.TestCase; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; -/** - * - * @author TSARDD - * @since 18-okt-2007 - */ -public class PreAuthenticatedProcessingFilterEntryPointTests extends TestCase { - - public void testGetSetOrder() { - Http403ForbiddenEntryPoint fep = new Http403ForbiddenEntryPoint(); - fep.setOrder(333); - assertEquals(fep.getOrder(), 333); - } +public class Http403ForbiddenEntryPointTests extends TestCase { public void testCommence() { MockHttpServletRequest req = new MockHttpServletRequest(); @@ -38,6 +27,5 @@ public class PreAuthenticatedProcessingFilterEntryPointTests extends TestCase { } catch (ServletException e) { fail("Unexpected exception thrown: "+e); } - } }