Polishing.

See #2265
This commit is contained in:
Peter-Josef Meisch 2022-08-10 21:19:46 +02:00
parent c93039410a
commit c4910bf399
No known key found for this signature in database
GPG Key ID: DE108246970C7708

View File

@ -41,11 +41,10 @@ public class ElasticsearchAggregations implements AggregationsContainer<List<Ela
Assert.notNull(aggregations, "aggregations must not be null");
Map<String, ElasticsearchAggregation> elasticsearchAggregationsAsMap = new HashMap<>(aggregations.size());
aggregations.forEach((name, aggregate) -> elasticsearchAggregationsAsMap //
aggregationsAsMap = new HashMap<>();
aggregations.forEach((name, aggregate) -> aggregationsAsMap //
.put(name, new ElasticsearchAggregation(new Aggregation(name, aggregate))));
this.aggregationsAsMap = elasticsearchAggregationsAsMap;
this.aggregations = new ArrayList<>(aggregationsAsMap.values());
}
@ -63,7 +62,7 @@ public class ElasticsearchAggregations implements AggregationsContainer<List<Ela
/**
* Returns the aggregation that is associated with the specified name.
*
*
* @param the name
* @return the aggregation
*/