diff options
author | Christoph Büscher <christoph@elastic.co> | 2016-04-13 22:29:57 +0200 |
---|---|---|
committer | Christoph Büscher <christoph@elastic.co> | 2016-04-14 16:18:05 +0200 |
commit | e15e7f7e6e16211c0de0f7a82ab4980e4e0605d9 (patch) | |
tree | ec9c499f14a7260c82b58ee20ab99bcac601b18a /core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java | |
parent | ed3a71fa2b69f0818a29fb4fba75caeb9dd7d513 (diff) |
Remove parser argument from methods where we already pass in a parse context
When we pass down both parser and QueryParseContext to a method, we cannot
make sure that the parser contained in the context and the parser that is
parsed as an argument have the same state. This removes the parser argument
from methods where we currently have both the parser and the parse context
as arguments and instead retrieves the parse from the context inside the
method.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java index 05ea6148a5..bd84853d93 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TopHitsTests.java @@ -177,7 +177,7 @@ public class TopHitsTests extends BaseAggregationTestCase<TopHitsAggregatorBuild parseContext.reset(parser); parseContext.parseFieldMatcher(parseFieldMatcher); assertSame(XContentParser.Token.START_OBJECT, parser.nextToken()); - aggParsers.parseAggregators(parser, parseContext); + aggParsers.parseAggregators(parseContext); fail(); } catch (AggregationInitializationException e) { assertThat(e.toString(), containsString("Aggregator [top_tags_hits] of type [top_hits] cannot accept sub-aggregations")); |