Use diamond type

This commit is contained in:
Johnny Lim
2017-11-20 02:25:30 +09:00
committed by Rob Winch
parent cfe40358bd
commit 57353d18e5
221 changed files with 423 additions and 428 deletions

View File

@@ -33,7 +33,7 @@ import org.springframework.security.core.userdetails.User;
public abstract class AbstractStatelessTicketCacheTests {
protected CasAuthenticationToken getToken() {
List<String> proxyList = new ArrayList<String>();
List<String> proxyList = new ArrayList<>();
proxyList.add("https://localhost/newPortal/login/cas");
User user = new User("rod", "password", true, true, true, true,

View File

@@ -392,7 +392,7 @@ public class CasAuthenticationProviderTests {
}
private class MockStatelessTicketCache implements StatelessTicketCache {
private Map<String, CasAuthenticationToken> cache = new HashMap<String, CasAuthenticationToken>();
private Map<String, CasAuthenticationToken> cache = new HashMap<>();
public CasAuthenticationToken getByTicketId(String serviceTicket) {
return cache.get(serviceTicket);

View File

@@ -44,7 +44,7 @@ public class GrantedAuthorityFromAssertionAttributesUserDetailsServiceTests {
uds.setConvertToUpperCase(false);
Assertion assertion = mock(Assertion.class);
AttributePrincipal principal = mock(AttributePrincipal.class);
Map<String, Object> attributes = new HashMap<String, Object>();
Map<String, Object> attributes = new HashMap<>();
attributes.put("a", Arrays.asList("role_a1", "role_a2"));
attributes.put("b", "role_b");
attributes.put("c", "role_c");