Polishing.

See #2265
This commit is contained in:
Peter-Josef Meisch 2022-08-12 07:27:07 +02:00
parent 68ba4cd39b
commit b511756b2b
No known key found for this signature in database
GPG Key ID: DE108246970C7708

View File

@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import org.springframework.data.elasticsearch.core.AggregationsContainer;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
@ -66,7 +67,11 @@ public class ElasticsearchAggregations implements AggregationsContainer<List<Ela
* @param name the name of the aggregation
* @return the aggregation or {@literal null} if not found
*/
@Nullable
public ElasticsearchAggregation get(String name) {
Assert.notNull(name, "name must not be null");
return aggregationsAsMap.get(name);
}