Skip to content

Commit

Permalink
Polish TestingAuthenticationToken
Browse files Browse the repository at this point in the history
Restore List constructor to retain binary compatibility.
  • Loading branch information
jzheaux committed Jun 22, 2023
1 parent 5a7eb10 commit 97cff7c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.security.authentication;

import java.util.Collection;
import java.util.List;

import org.springframework.security.core.GrantedAuthority;
Expand Down Expand Up @@ -47,7 +48,13 @@ public TestingAuthenticationToken(Object principal, Object credentials, String..
this(principal, credentials, AuthorityUtils.createAuthorityList(authorities));
}

public TestingAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
public TestingAuthenticationToken(Object principal, Object credentials,
List<? extends GrantedAuthority> authorities) {
this(principal, credentials, (Collection<? extends GrantedAuthority>) authorities);
}

public TestingAuthenticationToken(Object principal, Object credentials,
Collection<? extends GrantedAuthority> authorities) {
super(authorities);
this.principal = principal;
this.credentials = credentials;
Expand Down

0 comments on commit 97cff7c

Please sign in to comment.