From 1144329fa0563bb50c1020c3b1cf697c139aebd4 Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 22 Dec 2022 14:54:00 +0000 Subject: [PATCH] Cleanup --- .../elasticsearch/xpack/core/ccr/action/CcrStatsAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/CcrStatsAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/CcrStatsAction.java index 0c47200b26bf8..7bd3849a0cee7 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/CcrStatsAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ccr/action/CcrStatsAction.java @@ -15,6 +15,7 @@ import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ChunkedToXContent; +import org.elasticsearch.common.xcontent.ChunkedToXContentHelper; import org.elasticsearch.xcontent.ToXContent; import org.elasticsearch.xpack.core.ccr.AutoFollowStats; @@ -87,7 +88,7 @@ public Iterator toXContentChunked(ToXContent.Params outerP (builder, params) -> builder.startObject().field("auto_follow_stats", autoFollowStats, params).field("follow_stats") ), followStats.toXContentChunked(outerParams), - Iterators.single((builder, params) -> builder.endObject()) + ChunkedToXContentHelper.endObject() ); } @@ -103,7 +104,6 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(autoFollowStats, followStats); } - } }