diff --git a/core/src/test/java/org/springframework/security/access/hierarchicalroles/UserDetailsWrapperTests.java b/core/src/test/java/org/springframework/security/access/hierarchicalroles/UserDetailsWrapperTests.java index 809201f363..8fa86d64fb 100755 --- a/core/src/test/java/org/springframework/security/access/hierarchicalroles/UserDetailsWrapperTests.java +++ b/core/src/test/java/org/springframework/security/access/hierarchicalroles/UserDetailsWrapperTests.java @@ -1,22 +1,19 @@ package org.springframework.security.access.hierarchicalroles; -import java.util.List; - import junit.framework.TestCase; - -import org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl; -import org.springframework.security.access.hierarchicalroles.UserDetailsWrapper; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; +import java.util.*; + /** * Tests for {@link UserDetailsWrapper}. * * @author Michael Mayr */ -@SuppressWarnings("deprecation") +@SuppressWarnings({"deprecation"}) public class UserDetailsWrapperTests extends TestCase { private List authorities = null; @@ -25,13 +22,6 @@ public class UserDetailsWrapperTests extends TestCase { private UserDetailsWrapper userDetailsWrapper1 = null; private UserDetailsWrapper userDetailsWrapper2 = null; - public UserDetailsWrapperTests() { - } - - public UserDetailsWrapperTests(String testCaseName) { - super(testCaseName); - } - protected void setUp() throws Exception { RoleHierarchyImpl roleHierarchy = new RoleHierarchyImpl(); roleHierarchy.setHierarchy("ROLE_A > ROLE_B"); diff --git a/core/src/test/java/org/springframework/security/authentication/AuthenticationDetailsSourceImplTests.java b/core/src/test/java/org/springframework/security/authentication/AuthenticationDetailsSourceImplTests.java index afc63f6ddc..e233be0c8f 100644 --- a/core/src/test/java/org/springframework/security/authentication/AuthenticationDetailsSourceImplTests.java +++ b/core/src/test/java/org/springframework/security/authentication/AuthenticationDetailsSourceImplTests.java @@ -3,14 +3,12 @@ package org.springframework.security.authentication; import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.security.authentication.AuthenticationDetails; -import org.springframework.security.authentication.AuthenticationDetailsSourceImpl; -import org.springframework.security.authentication.TestingAuthenticationToken; /** * * @author Luke Taylor */ +@SuppressWarnings({"deprecation"}) public class AuthenticationDetailsSourceImplTests { @Test diff --git a/core/src/test/java/org/springframework/security/core/userdetails/memory/InMemoryDaoTests.java b/core/src/test/java/org/springframework/security/core/userdetails/memory/InMemoryDaoTests.java index 6ce8d51f95..7c2d1eefe2 100644 --- a/core/src/test/java/org/springframework/security/core/userdetails/memory/InMemoryDaoTests.java +++ b/core/src/test/java/org/springframework/security/core/userdetails/memory/InMemoryDaoTests.java @@ -16,13 +16,9 @@ package org.springframework.security.core.userdetails.memory; import junit.framework.TestCase; - import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.security.core.userdetails.memory.InMemoryDaoImpl; -import org.springframework.security.core.userdetails.memory.UserMap; -import org.springframework.security.core.userdetails.memory.UserMapEditor; -import java.util.Properties; +import java.util.*; /** @@ -30,7 +26,7 @@ import java.util.Properties; * * @author Ben Alex */ -@SuppressWarnings("deprecation") +@SuppressWarnings({"deprecation"}) public class InMemoryDaoTests extends TestCase { //~ Methods ======================================================================================================== @@ -42,10 +38,6 @@ public class InMemoryDaoTests extends TestCase { return (UserMap) editor.getValue(); } - public final void setUp() throws Exception { - super.setUp(); - } - public void testLookupFails() throws Exception { InMemoryDaoImpl dao = new InMemoryDaoImpl(); dao.setUserMap(makeUserMap()); @@ -80,7 +72,7 @@ public class InMemoryDaoTests extends TestCase { try { dao.afterPropertiesSet(); - fail("Shoudl have thrown IllegalArgumentException"); + fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException expected) { assertTrue(true); } @@ -92,7 +84,7 @@ public class InMemoryDaoTests extends TestCase { try { dao.afterPropertiesSet(); - fail("Shoudl have thrown IllegalArgumentException"); + fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException expected) { assertTrue(true); } diff --git a/core/src/test/java/org/springframework/security/core/userdetails/memory/UserMapEditorTests.java b/core/src/test/java/org/springframework/security/core/userdetails/memory/UserMapEditorTests.java index 5b059f90fa..60d871a59c 100644 --- a/core/src/test/java/org/springframework/security/core/userdetails/memory/UserMapEditorTests.java +++ b/core/src/test/java/org/springframework/security/core/userdetails/memory/UserMapEditorTests.java @@ -16,10 +16,7 @@ package org.springframework.security.core.userdetails.memory; import junit.framework.TestCase; - import org.springframework.security.core.authority.AuthorityUtils; -import org.springframework.security.core.userdetails.memory.UserMap; -import org.springframework.security.core.userdetails.memory.UserMapEditor; /**