Skip to content

Commit

Permalink
fix java9 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
bleskes committed Dec 1, 2017
1 parent 741f7cd commit dbf98e8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ public Translog.Operation next() throws IOException {
assertThat(result.totalOperations, equalTo(expectedOps));
final ArgumentCaptor<List> shippedOpsCaptor = ArgumentCaptor.forClass(List.class);
verify(recoveryTarget).indexTranslogOperations(shippedOpsCaptor.capture(), ArgumentCaptor.forClass(Integer.class).capture());
List<Translog.Operation> shippedOps = shippedOpsCaptor.getAllValues().stream()
.flatMap(List::stream).map(o -> (Translog.Operation) o).collect(Collectors.toList());
List<Translog.Operation> shippedOps = new ArrayList<>();
for (List list: shippedOpsCaptor.getAllValues()) {
shippedOps.addAll(list);
}
shippedOps.sort(Comparator.comparing(Translog.Operation::seqNo));
assertThat(shippedOps.size(), equalTo(expectedOps));
for (int i = 0; i < shippedOps.size(); i++) {
Expand Down

0 comments on commit dbf98e8

Please sign in to comment.