Fix compilation issues after elastic/elasticsearch#23788

Original commit: elastic/x-pack-elasticsearch@ea24170b41
This commit is contained in:
Simon Willnauer 2017-03-30 15:00:10 +02:00
parent f6d8f92d40
commit 3abe7a2058
2 changed files with 2 additions and 5 deletions

View File

@ -49,8 +49,7 @@ public final class GroupedActionListener<T> implements ActionListener<T> {
if (failure.get() != null) {
delegate.onFailure(failure.get());
} else {
List<T> collect = this.roles.asList().stream().map((e)
-> e.value).filter(Objects::nonNull).collect(Collectors.toList());
List<T> collect = this.roles.asList();
collect.addAll(defaults);
delegate.onResponse(Collections.unmodifiableList(collect));
}

View File

@ -452,9 +452,7 @@ public class GetJobsStatsAction extends Action<GetJobsStatsAction.Request, GetJo
assignmentExplanation, null));
if (counter.decrementAndGet() == 0) {
List<Response.JobStats> results = response.getResponse().results();
results.addAll(jobStats.asList().stream()
.map(e -> e.value)
.collect(Collectors.toList()));
results.addAll(jobStats.asList());
listener.onResponse(new Response(response.getTaskFailures(), response.getNodeFailures(),
new QueryPage<>(results, results.size(), Job.RESULTS_FIELD)));
}