diff --git a/acl/pom.xml b/acl/pom.xml index f0ce51a238..0f6779916d 100644 --- a/acl/pom.xml +++ b/acl/pom.xml @@ -17,6 +17,7 @@ spring-security-core ${project.version} + org.springframework.security spring-security-core diff --git a/core/src/test/java/org/springframework/security/providers/TestingAuthenticationProvider.java b/core/src/main/java/org/springframework/security/providers/TestingAuthenticationProvider.java similarity index 82% rename from core/src/test/java/org/springframework/security/providers/TestingAuthenticationProvider.java rename to core/src/main/java/org/springframework/security/providers/TestingAuthenticationProvider.java index 1860f71f59..7425d09973 100644 --- a/core/src/test/java/org/springframework/security/providers/TestingAuthenticationProvider.java +++ b/core/src/main/java/org/springframework/security/providers/TestingAuthenticationProvider.java @@ -22,8 +22,9 @@ import org.springframework.security.AuthenticationException; /** * An {@link AuthenticationProvider} implementation for the {@link TestingAuthenticationToken}.

It simply * accepts as valid whatever is contained within the TestingAuthenticationToken.

- *

The purpose of this implementation is to facilitate unit testing. This provider should never be enabled - * on a production system.

+ *

+ * The purpose of this implementation is to facilitate unit testing. This provider should never be enabled + * on a production system. * * @author Ben Alex * @version $Id$ @@ -37,10 +38,6 @@ public class TestingAuthenticationProvider implements AuthenticationProvider { } public boolean supports(Class authentication) { - if (TestingAuthenticationToken.class.isAssignableFrom(authentication)) { - return true; - } else { - return false; - } + return TestingAuthenticationToken.class.isAssignableFrom(authentication); } } diff --git a/core/src/test/java/org/springframework/security/providers/TestingAuthenticationToken.java b/core/src/main/java/org/springframework/security/providers/TestingAuthenticationToken.java similarity index 86% rename from core/src/test/java/org/springframework/security/providers/TestingAuthenticationToken.java rename to core/src/main/java/org/springframework/security/providers/TestingAuthenticationToken.java index 4d4ae97206..40f5180545 100644 --- a/core/src/test/java/org/springframework/security/providers/TestingAuthenticationToken.java +++ b/core/src/main/java/org/springframework/security/providers/TestingAuthenticationToken.java @@ -20,8 +20,9 @@ import org.springframework.security.util.AuthorityUtils; /** - * An {@link org.springframework.security.Authentication} implementation that is designed for use whilst unit testing.

The - * corresponding authentication provider is {@link TestingAuthenticationProvider}.

+ * An {@link org.springframework.security.Authentication} implementation that is designed for use whilst unit testing. + *

+ * The corresponding authentication provider is {@link TestingAuthenticationProvider}. * * @author Ben Alex * @version $Id$ @@ -36,15 +37,15 @@ public class TestingAuthenticationToken extends AbstractAuthenticationToken { //~ Constructors =================================================================================================== public TestingAuthenticationToken(Object principal, Object credentials) { - super(null); + super(null); this.principal = principal; - this.credentials = credentials; - } + this.credentials = credentials; + } + - public TestingAuthenticationToken(Object principal, Object credentials, String... authorities) { - this(principal, credentials, AuthorityUtils.stringArrayToAuthorityArray(authorities)); - } + this(principal, credentials, AuthorityUtils.stringArrayToAuthorityArray(authorities)); + } public TestingAuthenticationToken(Object principal, Object credentials, GrantedAuthority[] authorities) { super(authorities); diff --git a/portlet/pom.xml b/portlet/pom.xml index 518f85412a..810a83cbfd 100644 --- a/portlet/pom.xml +++ b/portlet/pom.xml @@ -14,13 +14,6 @@ org.springframework.security spring-security-core ${project.version} - - - org.springframework.security - spring-security-core - ${project.version} - tests - test javax.servlet diff --git a/sandbox/captcha/pom.xml b/sandbox/captcha/pom.xml index a1b2622bfd..cf66b36c1a 100644 --- a/sandbox/captcha/pom.xml +++ b/sandbox/captcha/pom.xml @@ -16,13 +16,6 @@ spring-security-core ${project.version} - - org.springframework.security - spring-security-core - ${project.version} - tests - test - javax.servlet servlet-api diff --git a/sandbox/other/pom.xml b/sandbox/other/pom.xml index f5b9077b2f..99bcdefaa9 100644 --- a/sandbox/other/pom.xml +++ b/sandbox/other/pom.xml @@ -17,12 +17,6 @@ spring-security-core ${project.version} - - org.springframework.security - spring-security-core - tests - ${project.version} - org.springframework spring-test diff --git a/taglibs/pom.xml b/taglibs/pom.xml index ca6f6efce2..87c0071222 100644 --- a/taglibs/pom.xml +++ b/taglibs/pom.xml @@ -18,13 +18,6 @@ spring-security-core ${project.version} - - org.springframework.security - spring-security-core - ${project.version} - tests - test - org.springframework.security spring-security-acl