stats: fix npe in rest layer

Original commit: elastic/x-pack-elasticsearch@43b3fcf3e7
This commit is contained in:
Martijn van Groningen 2015-05-21 11:12:52 +02:00
parent c3dd74df7f
commit 283445b9d8
1 changed files with 1 additions and 1 deletions

View File

@ -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")) {