SEC-349: GrantedAuthority constructor argument can be null.

This commit is contained in:
Ben Alex
2006-09-15 03:42:11 +00:00
parent 58d3f0c56f
commit f0b259a32e
2 changed files with 5 additions and 28 deletions

View File

@@ -70,26 +70,12 @@ public class RememberMeAuthenticationTokenTests extends TestCase {
assertTrue(true);
}
try {
new RememberMeAuthenticationToken("key", "Test", null);
fail("Should have thrown IllegalArgumentException");
} catch (IllegalArgumentException expected) {
assertTrue(true);
}
try {
new RememberMeAuthenticationToken("key", "Test", new GrantedAuthority[] {null});
fail("Should have thrown IllegalArgumentException");
} catch (IllegalArgumentException expected) {
assertTrue(true);
}
try {
new RememberMeAuthenticationToken("key", "Test", new GrantedAuthority[] {});
fail("Should have thrown IllegalArgumentException");
} catch (IllegalArgumentException expected) {
assertTrue(true);
}
}
public void testEqualsWhenEqual() {