SEC-1304: Removed compareTo method from GrantedAuthorityImpl

This method had been left by mistake when the Comparable 
interface was removed. See also SEC-1347.
This commit is contained in:
Luke Taylor
2010-01-04 19:13:49 +00:00
parent c6b8fe5e55
commit 93973a4b75
2 changed files with 0 additions and 32 deletions

View File

@@ -61,30 +61,12 @@ public class GrantedAuthorityImplTests {
assertEquals("TEST", auth.toString());
}
@Test
public void compareToGrantedAuthorityWithSameValueReturns0() {
assertEquals(0, new GrantedAuthorityImpl("TEST").compareTo(new MockGrantedAuthority("TEST")));
}
@Test
public void compareToNullReturnsNegativeOne() {
assertEquals(-1, new GrantedAuthorityImpl("TEST").compareTo(null));
}
/* SEC-899 */
@Test
public void compareToHandlesCustomAuthorityWhichReturnsNullFromGetAuthority() {
assertEquals(-1, new GrantedAuthorityImpl("TEST").compareTo(new MockGrantedAuthority()));
}
//~ Inner Classes ==================================================================================================
private class MockGrantedAuthority implements GrantedAuthority {
private String role;
public MockGrantedAuthority() {
}
public MockGrantedAuthority(String role) {
this.role = role;
}