Skip to content

Commit b511756

Browse files
committed
Polishing.
See #2265
1 parent 68ba4cd commit b511756

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregations.java

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.Map;
2424

2525
import org.springframework.data.elasticsearch.core.AggregationsContainer;
26+
import org.springframework.lang.Nullable;
2627
import org.springframework.util.Assert;
2728

2829
/**
@@ -66,7 +67,11 @@ public Map<String, ElasticsearchAggregation> aggregationsAsMap() {
6667
* @param name the name of the aggregation
6768
* @return the aggregation or {@literal null} if not found
6869
*/
70+
@Nullable
6971
public ElasticsearchAggregation get(String name) {
72+
73+
Assert.notNull(name, "name must not be null");
74+
7075
return aggregationsAsMap.get(name);
7176
}
7277

0 commit comments

Comments
 (0)