Просмотр исходного кода

Removed Ordered interface from Http403EntryPoint (unused).

Luke Taylor 16 лет назад
Родитель
Сommit
e7486fc203

+ 3 - 14
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;
 
 /**
  * <p>
@@ -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;
-    }
 
 }

+ 1 - 13
web/src/test/java/org/springframework/security/web/authentication/preauth/PreAuthenticatedProcessingFilterEntryPointTests.java → 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);
         }
-
     }
 }