stats: fix npe in rest layer
Original commit: elastic/x-pack-elasticsearch@43b3fcf3e7
This commit is contained in:
parent
c3dd74df7f
commit
283445b9d8
|
@ -35,7 +35,7 @@ public class RestWatcherStatsAction extends WatcherRestHandler {
|
|||
|
||||
@Override
|
||||
protected void handleRequest(final RestRequest restRequest, RestChannel restChannel, WatcherClient client) throws Exception {
|
||||
Set<String> metrics = Strings.splitStringByCommaToSet(restRequest.param("metric"));
|
||||
Set<String> metrics = Strings.splitStringByCommaToSet(restRequest.param("metric", ""));
|
||||
|
||||
WatcherStatsRequest request = new WatcherStatsRequest();
|
||||
if (metrics.size() == 1 && metrics.contains("_all")) {
|
||||
|
|
Loading…
Reference in New Issue