Ver código fonte

TestingAuthenticationToken takes broader collection type

So that callers do not have to cast.

Closes gh-12953
Laurent Martelli 2 anos atrás
pai
commit
f25d76c48f

+ 1 - 1
core/src/main/java/org/springframework/security/authentication/TestingAuthenticationToken.java

@@ -47,7 +47,7 @@ public class TestingAuthenticationToken extends AbstractAuthenticationToken {
 		this(principal, credentials, AuthorityUtils.createAuthorityList(authorities));
 	}
 
-	public TestingAuthenticationToken(Object principal, Object credentials, List<GrantedAuthority> authorities) {
+	public TestingAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
 		super(authorities);
 		this.principal = principal;
 		this.credentials = credentials;