mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-13 22:03:33 +00:00
Fix TestingAuthenticationTokenTests JDK 1.6 compile
Issue: gh-5097
This commit is contained in:
parent
72080bb5fe
commit
4cad151b57
@ -16,6 +16,7 @@
|
||||
package org.springframework.security.authentication;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -46,7 +47,7 @@ public class TestingAuthenticationTokenTests {
|
||||
public void constructorWhenCollectionAuthoritiesThenAuthenticated() {
|
||||
TestingAuthenticationToken authenticated =
|
||||
new TestingAuthenticationToken("principal", "credentials",
|
||||
Arrays.asList(new SimpleGrantedAuthority("authority")));
|
||||
Arrays.<GrantedAuthority>asList(new SimpleGrantedAuthority("authority")));
|
||||
|
||||
assertThat(authenticated.isAuthenticated()).isTrue();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user