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() {
super();
throw new IllegalArgumentException("Cannot use default constructor");
}
//~ Methods ================================================================

View File

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

View File

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

View File

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

View File

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