From 283445b9d83caa5d86e7bfdf4095575ee2490306 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 21 May 2015 11:12:52 +0200 Subject: [PATCH] stats: fix npe in rest layer Original commit: elastic/x-pack-elasticsearch@43b3fcf3e764e165e753e06286644e1e936e01ee --- .../watcher/rest/action/RestWatcherStatsAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/watcher/rest/action/RestWatcherStatsAction.java b/src/main/java/org/elasticsearch/watcher/rest/action/RestWatcherStatsAction.java index f9272d80c5a..83eb2a98609 100644 --- a/src/main/java/org/elasticsearch/watcher/rest/action/RestWatcherStatsAction.java +++ b/src/main/java/org/elasticsearch/watcher/rest/action/RestWatcherStatsAction.java @@ -35,7 +35,7 @@ public class RestWatcherStatsAction extends WatcherRestHandler { @Override protected void handleRequest(final RestRequest restRequest, RestChannel restChannel, WatcherClient client) throws Exception { - Set metrics = Strings.splitStringByCommaToSet(restRequest.param("metric")); + Set metrics = Strings.splitStringByCommaToSet(restRequest.param("metric", "")); WatcherStatsRequest request = new WatcherStatsRequest(); if (metrics.size() == 1 && metrics.contains("_all")) {