Changed no-arg constructor to a form more suitable for unit testing.

This commit is contained in:
Ben Alex 2004-03-28 12:02:41 +00:00
parent 68ee9aaabb
commit c5951ff1c0
5 changed files with 8 additions and 8 deletions

View File

@ -44,7 +44,7 @@ public class JettyAcegiUserToken extends AbstractAdapterAuthenticationToken
} }
protected JettyAcegiUserToken() { protected JettyAcegiUserToken() {
super(); throw new IllegalArgumentException("Cannot use default constructor");
} }
//~ Methods ================================================================ //~ Methods ================================================================

View File

@ -38,8 +38,8 @@ public class GrantedAuthorityImpl implements GrantedAuthority {
this.role = role; this.role = role;
} }
private GrantedAuthorityImpl() { protected GrantedAuthorityImpl() {
super(); throw new IllegalArgumentException("Cannot use default constructor");
} }
//~ Methods ================================================================ //~ Methods ================================================================

View File

@ -32,8 +32,8 @@ public class SecurityConfig implements ConfigAttribute {
this.attrib = config; this.attrib = config;
} }
private SecurityConfig() { protected SecurityConfig() {
super(); throw new IllegalArgumentException("Cannot use default constructor");
} }
//~ Methods ================================================================ //~ Methods ================================================================

View File

@ -44,7 +44,7 @@ public class PrincipalAcegiUserToken extends AbstractAdapterAuthenticationToken
} }
protected PrincipalAcegiUserToken() { protected PrincipalAcegiUserToken() {
super(); throw new IllegalArgumentException("Cannot use default constructor");
} }
//~ Methods ================================================================ //~ Methods ================================================================

View File

@ -47,8 +47,8 @@ public class RunAsUserToken extends AbstractAuthenticationToken {
this.originalAuthentication = originalAuthentication; this.originalAuthentication = originalAuthentication;
} }
private RunAsUserToken() { protected RunAsUserToken() {
super(); throw new IllegalArgumentException("Cannot use default constructor");
} }
//~ Methods ================================================================ //~ Methods ================================================================