diff --git a/core/src/main/java/org/springframework/security/authentication/TestingAuthenticationToken.java b/core/src/main/java/org/springframework/security/authentication/TestingAuthenticationToken.java index 38996477b1c..abfc6560f45 100644 --- a/core/src/main/java/org/springframework/security/authentication/TestingAuthenticationToken.java +++ b/core/src/main/java/org/springframework/security/authentication/TestingAuthenticationToken.java @@ -16,6 +16,7 @@ package org.springframework.security.authentication; +import java.util.Collection; import java.util.List; import org.springframework.security.core.GrantedAuthority; @@ -47,7 +48,13 @@ public TestingAuthenticationToken(Object principal, Object credentials, String.. this(principal, credentials, AuthorityUtils.createAuthorityList(authorities)); } - public TestingAuthenticationToken(Object principal, Object credentials, Collection authorities) { + public TestingAuthenticationToken(Object principal, Object credentials, + List authorities) { + this(principal, credentials, (Collection) authorities); + } + + public TestingAuthenticationToken(Object principal, Object credentials, + Collection authorities) { super(authorities); this.principal = principal; this.credentials = credentials;