Selaa lähdekoodia

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

Ben Alex 21 vuotta sitten
vanhempi
commit
1573491fbe

+ 2 - 2
core/src/main/java/org/acegisecurity/providers/TestingAuthenticationToken.java

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

+ 2 - 2
core/src/main/java/org/acegisecurity/providers/UsernamePasswordAuthenticationToken.java

@@ -56,8 +56,8 @@ public class UsernamePasswordAuthenticationToken
         this.authorities = authorities;
     }
 
-    private UsernamePasswordAuthenticationToken() {
-        super();
+    protected UsernamePasswordAuthenticationToken() {
+        throw new IllegalArgumentException("Cannot use default constructor");
     }
 
     //~ Methods ================================================================