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

@@ -230,7 +230,7 @@ public class ActiveDirectoryLdapAuthenticationProviderTests {
when(
ctx.search(any(Name.class), any(String.class), any(Object[].class),
any(SearchControls.class))).thenReturn(
new EmptyEnumeration<SearchResult>());
new EmptyEnumeration<>());
provider.contextFactory = createContextFactoryReturning(ctx);

View File

@@ -43,7 +43,7 @@ public class InetOrgPersonTests {
InetOrgPerson p = (InetOrgPerson) essence.createUserDetails();
essence = new InetOrgPerson.Essence(createUserContext());
InetOrgPerson p2 = (InetOrgPerson) essence.createUserDetails();
Set<InetOrgPerson> set = new HashSet<InetOrgPerson>();
Set<InetOrgPerson> set = new HashSet<>();
set.add(p);
assertThat(set.contains(p2)).isTrue();
}