Use diamond type
This commit is contained in:
@@ -237,13 +237,13 @@ public class AclImplTests {
|
||||
true, new PrincipalSid("joe"));
|
||||
Sid ben = new PrincipalSid("ben");
|
||||
try {
|
||||
acl.isGranted(new ArrayList<Permission>(0), Arrays.asList(ben), false);
|
||||
acl.isGranted(new ArrayList<>(0), Arrays.asList(ben), false);
|
||||
fail("It should have thrown IllegalArgumentException");
|
||||
}
|
||||
catch (IllegalArgumentException expected) {
|
||||
}
|
||||
try {
|
||||
acl.isGranted(READ, new ArrayList<Sid>(0), false);
|
||||
acl.isGranted(READ, new ArrayList<>(0), false);
|
||||
fail("It should have thrown IllegalArgumentException");
|
||||
}
|
||||
catch (IllegalArgumentException expected) {
|
||||
@@ -500,7 +500,7 @@ public class AclImplTests {
|
||||
.isTrue();
|
||||
assertThat(acl.isSidLoaded(BEN)).isTrue();
|
||||
assertThat(acl.isSidLoaded(null)).isTrue();
|
||||
assertThat(acl.isSidLoaded(new ArrayList<Sid>(0))).isTrue();
|
||||
assertThat(acl.isSidLoaded(new ArrayList<>(0))).isTrue();
|
||||
assertThat(acl.isSidLoaded(Arrays.asList((Sid) new GrantedAuthoritySid(
|
||||
"ROLE_IGNORED"), new GrantedAuthoritySid("ROLE_IGNORED"))))
|
||||
.isTrue();
|
||||
|
||||
@@ -55,7 +55,7 @@ public class JdbcAclServiceTests {
|
||||
// SEC-1898
|
||||
@Test(expected = NotFoundException.class)
|
||||
public void readAclByIdMissingAcl() {
|
||||
Map<ObjectIdentity, Acl> result = new HashMap<ObjectIdentity, Acl>();
|
||||
Map<ObjectIdentity, Acl> result = new HashMap<>();
|
||||
when(
|
||||
lookupStrategy.readAclsById(anyListOf(ObjectIdentity.class),
|
||||
anyListOf(Sid.class))).thenReturn(result);
|
||||
|
||||
Reference in New Issue
Block a user