From b7afd80b3f90330ed854c47d2d01f136e3f66b28 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 1 Apr 2016 08:42:45 -0400 Subject: [PATCH] Fix mistake in TopHits change --- .../metrics/tophits/TopHitsAggregatorBuilder.java | 2 +- .../search/aggregations/BaseAggregationTestCase.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregatorBuilder.java b/core/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregatorBuilder.java index 01d31ec1c24..c4dd8452cbd 100644 --- a/core/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregatorBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregatorBuilder.java @@ -538,7 +538,7 @@ public class TopHitsAggregatorBuilder extends AggregatorBuilder scriptFields = new ArrayList<>(size); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/BaseAggregationTestCase.java b/core/src/test/java/org/elasticsearch/search/aggregations/BaseAggregationTestCase.java index 14e31c48282..79de06ff9b7 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/BaseAggregationTestCase.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/BaseAggregationTestCase.java @@ -249,9 +249,9 @@ public abstract class BaseAggregationTestCase> try (StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(output.bytes()), namedWriteableRegistry)) { AggregatorBuilder deserializedQuery = namedWriteableRegistry.getReader(AggregatorBuilder.class, testAgg.getWriteableName()) .read(in); - assertEquals(deserializedQuery, testAgg); - assertEquals(deserializedQuery.hashCode(), testAgg.hashCode()); - assertNotSame(deserializedQuery, testAgg); + assertEquals(testAgg, deserializedQuery); + assertEquals(testAgg.hashCode(), deserializedQuery.hashCode()); + assertNotSame(testAgg, deserializedQuery); } } }