diff --git a/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java b/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java index c8d54a86..17a6903e 100644 --- a/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java +++ b/src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/http_action/config/PerformanceAnalyzerConfigAction.java @@ -49,6 +49,10 @@ public class PerformanceAnalyzerConfigAction extends BaseRestHandler { private static PerformanceAnalyzerConfigAction instance = null; private boolean isInitialized = false; private boolean featureEanbledDefaultValue = true; + private static final List ROUTES = unmodifiableList(asList( + new Route(org.elasticsearch.rest.RestRequest.Method.GET, "/_opendistro/_performanceanalyzer/config"), + new Route(org.elasticsearch.rest.RestRequest.Method.POST, "/_opendistro/_performanceanalyzer/config") + )); public static PerformanceAnalyzerConfigAction getInstance() { return instance; @@ -68,10 +72,7 @@ public PerformanceAnalyzerConfigAction(RestController controller) { @Override public List routes() { - return unmodifiableList(asList( - new Route(org.elasticsearch.rest.RestRequest.Method.GET, "/_opendistro/_performanceanalyzer/config"), - new Route(org.elasticsearch.rest.RestRequest.Method.POST, "/_opendistro/_performanceanalyzer/config") - )); + return ROUTES; } @Override