From 251b6d452b1fbf5a3422eb296a602b7f15b39cea Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Fri, 21 Apr 2017 15:29:53 +0200 Subject: [PATCH] MultiBucketsAggregation.Bucket should not extend Writeable (#24216) The MultiBucketsAggregation.Bucket interface extends Writeable, forcing all implementation classes to implement writeTo(). This commit removes the Writeable from the interface and move it down to the InternalBucket implementation. --- .../search/aggregations/InternalMultiBucketAggregation.java | 3 ++- .../search/aggregations/bucket/MultiBucketsAggregation.java | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/InternalMultiBucketAggregation.java b/core/src/main/java/org/elasticsearch/search/aggregations/InternalMultiBucketAggregation.java index 5317f519819..8e8f4edcf31 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/InternalMultiBucketAggregation.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/InternalMultiBucketAggregation.java @@ -20,6 +20,7 @@ package org.elasticsearch.search.aggregations; import org.elasticsearch.common.io.stream.StreamInput; +import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation; import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator; @@ -81,7 +82,7 @@ public abstract class InternalMultiBucketAggregation path) { if (path.isEmpty()) { diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/MultiBucketsAggregation.java b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/MultiBucketsAggregation.java index 49c58002227..fc223916f72 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/bucket/MultiBucketsAggregation.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/bucket/MultiBucketsAggregation.java @@ -19,7 +19,6 @@ package org.elasticsearch.search.aggregations.bucket; -import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.util.Comparators; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.search.aggregations.Aggregation; @@ -37,7 +36,7 @@ public interface MultiBucketsAggregation extends Aggregation { * A bucket represents a criteria to which all documents that fall in it adhere to. It is also uniquely identified * by a key, and can potentially hold sub-aggregations computed over all documents in it. */ - interface Bucket extends HasAggregations, ToXContent, Writeable { + interface Bucket extends HasAggregations, ToXContent { /** * @return The key associated with the bucket */