add type parameters to fix compilation

Original commit: elastic/x-pack-elasticsearch@0a8a16f9a0
This commit is contained in:
jaymode 2016-03-29 15:00:53 -04:00
parent c34598a3cd
commit 0a7b4257f5
1 changed files with 9 additions and 9 deletions

View File

@ -109,16 +109,16 @@ public class IndicesAccessControlTests extends ESTestCase {
}
public void testMergeNotGrantedAndGranted() {
final Set<String> notGrantedFields = randomFrom(null, Collections.emptySet(), Collections.singleton("baz"));
final Set<BytesReference> notGrantedQueries = randomFrom(null, Collections.emptySet(),
Collections.singleton(new BytesArray(new byte[] { randomByte() })));
final Set<String> notGrantedFields = randomFrom(null, Collections.<String>emptySet(), Collections.singleton("baz"));
final Set<BytesReference> notGrantedQueries = randomFrom(null, Collections.<BytesReference>emptySet(),
Collections.<BytesReference>singleton(new BytesArray(new byte[] { randomByte() })));
final IndexAccessControl indexAccessControl = new IndexAccessControl(false, notGrantedFields, notGrantedQueries);
final BytesReference query1 = new BytesArray(new byte[] { 0x1 });
final Set<String> fields =
randomFrom(null, Collections.singleton("foo"), Sets.newHashSet("foo", "bar"), Collections.emptySet());
randomFrom(null, Collections.singleton("foo"), Sets.newHashSet("foo", "bar"), Collections.<String>emptySet());
final Set<BytesReference> queries =
randomFrom(null, Collections.singleton(query1), Collections.emptySet());
randomFrom(null, Collections.singleton(query1), Collections.<BytesReference>emptySet());
final IndexAccessControl other = new IndexAccessControl(true, fields, queries);
IndexAccessControl merged = indexAccessControl.merge(other);
@ -133,16 +133,16 @@ public class IndicesAccessControlTests extends ESTestCase {
}
public void testMergeNotGranted() {
final Set<String> notGrantedFields = randomFrom(null, Collections.emptySet(), Collections.singleton("baz"));
final Set<BytesReference> notGrantedQueries = randomFrom(null, Collections.emptySet(),
final Set<String> notGrantedFields = randomFrom(null, Collections.<String>emptySet(), Collections.singleton("baz"));
final Set<BytesReference> notGrantedQueries = randomFrom(null, Collections.<BytesReference>emptySet(),
Collections.singleton(new BytesArray(new byte[] { randomByte() })));
final IndexAccessControl indexAccessControl = new IndexAccessControl(false, notGrantedFields, notGrantedQueries);
final BytesReference query1 = new BytesArray(new byte[] { 0x1 });
final Set<String> fields =
randomFrom(null, Collections.singleton("foo"), Sets.newHashSet("foo", "bar"), Collections.emptySet());
randomFrom(null, Collections.singleton("foo"), Sets.newHashSet("foo", "bar"), Collections.<String>emptySet());
final Set<BytesReference> queries =
randomFrom(null, Collections.singleton(query1), Collections.emptySet());
randomFrom(null, Collections.singleton(query1), Collections.<BytesReference>emptySet());
final IndexAccessControl other = new IndexAccessControl(false, fields, queries);
IndexAccessControl merged = indexAccessControl.merge(other);