diff --git a/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java index 6cbff4e7753..0f99cc8960c 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java @@ -34,7 +34,7 @@ public class RestWatcherStatsAction extends WatcherRestHandler { @Override protected RestChannelConsumer doPrepareRequest(final RestRequest restRequest, WatcherClient client) throws IOException { - Set metrics = Strings.splitStringByCommaToSet(restRequest.param("metric", "")); + Set metrics = Strings.tokenizeByCommaToSet(restRequest.param("metric", "")); WatcherStatsRequest request = new WatcherStatsRequest(); if (metrics.contains("_all")) {