Explorar o código

Fix TestingAuthenticationTokenTests JDK 1.6 compile

Issue: gh-5097
Rob Winch %!s(int64=7) %!d(string=hai) anos
pai
achega
4cad151b57

+ 2 - 1
core/src/test/java/org/springframework/security/authentication/TestingAuthenticationTokenTests.java

@@ -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();
 	}