diff --git a/adapters/jetty/src/main/java/org/acegisecurity/adapters/jetty/JettyAcegiUserToken.java b/adapters/jetty/src/main/java/org/acegisecurity/adapters/jetty/JettyAcegiUserToken.java index a8c3660819..ff7a297081 100644 --- a/adapters/jetty/src/main/java/org/acegisecurity/adapters/jetty/JettyAcegiUserToken.java +++ b/adapters/jetty/src/main/java/org/acegisecurity/adapters/jetty/JettyAcegiUserToken.java @@ -44,7 +44,7 @@ public class JettyAcegiUserToken extends AbstractAdapterAuthenticationToken } protected JettyAcegiUserToken() { - super(); + throw new IllegalArgumentException("Cannot use default constructor"); } //~ Methods ================================================================ diff --git a/core/src/main/java/org/acegisecurity/GrantedAuthorityImpl.java b/core/src/main/java/org/acegisecurity/GrantedAuthorityImpl.java index a1d094dcb7..7629cb3a40 100644 --- a/core/src/main/java/org/acegisecurity/GrantedAuthorityImpl.java +++ b/core/src/main/java/org/acegisecurity/GrantedAuthorityImpl.java @@ -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 ================================================================ diff --git a/core/src/main/java/org/acegisecurity/SecurityConfig.java b/core/src/main/java/org/acegisecurity/SecurityConfig.java index a43290dd62..e289c09de3 100644 --- a/core/src/main/java/org/acegisecurity/SecurityConfig.java +++ b/core/src/main/java/org/acegisecurity/SecurityConfig.java @@ -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 ================================================================ diff --git a/core/src/main/java/org/acegisecurity/adapters/PrincipalAcegiUserToken.java b/core/src/main/java/org/acegisecurity/adapters/PrincipalAcegiUserToken.java index 3100c62a3b..39ecf3fa9f 100644 --- a/core/src/main/java/org/acegisecurity/adapters/PrincipalAcegiUserToken.java +++ b/core/src/main/java/org/acegisecurity/adapters/PrincipalAcegiUserToken.java @@ -44,7 +44,7 @@ public class PrincipalAcegiUserToken extends AbstractAdapterAuthenticationToken } protected PrincipalAcegiUserToken() { - super(); + throw new IllegalArgumentException("Cannot use default constructor"); } //~ Methods ================================================================ diff --git a/core/src/main/java/org/acegisecurity/runas/RunAsUserToken.java b/core/src/main/java/org/acegisecurity/runas/RunAsUserToken.java index cc42a93d5f..e68f37848a 100644 --- a/core/src/main/java/org/acegisecurity/runas/RunAsUserToken.java +++ b/core/src/main/java/org/acegisecurity/runas/RunAsUserToken.java @@ -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 ================================================================