diff --git a/server/src/main/java/org/opensearch/rest/BaseRestHandler.java b/server/src/main/java/org/opensearch/rest/BaseRestHandler.java index d4b5d0b7c8a..acd4b2011a9 100644 --- a/server/src/main/java/org/opensearch/rest/BaseRestHandler.java +++ b/server/src/main/java/org/opensearch/rest/BaseRestHandler.java @@ -95,12 +95,6 @@ public abstract class BaseRestHandler implements RestHandler { */ public abstract String getName(); - /** - * {@inheritDoc} - */ - @Override - public abstract List routes(); - @Override public final void handleRequest(RestRequest request, RestChannel channel, NodeClient client) throws Exception { // prepare the request for execution; has the side effect of touching the request parameters diff --git a/server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java b/server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java index 6454bb4f510..d4640a80ce4 100644 --- a/server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java +++ b/server/src/test/java/org/opensearch/rest/BaseRestHandlerTests.java @@ -49,7 +49,6 @@ import org.opensearch.threadpool.ThreadPool; import java.io.IOException; import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; @@ -87,11 +86,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_one_unconsumed_response_action"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final HashMap params = new HashMap<>(); @@ -118,11 +112,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_multiple_unconsumed_response_action"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final HashMap params = new HashMap<>(); @@ -159,11 +148,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_unconsumed_did_you_mean_response_action"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final HashMap params = new HashMap<>(); @@ -207,11 +191,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_unconsumed_response_action"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final HashMap params = new HashMap<>(); @@ -235,11 +214,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_default_response_action"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final HashMap params = new HashMap<>(); @@ -275,11 +249,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_cat_response_action"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final HashMap params = new HashMap<>(); @@ -310,11 +279,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_consumed_body"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; try (XContentBuilder builder = JsonXContent.contentBuilder().startObject().endObject()) { @@ -339,11 +303,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_unconsumed_body"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; final RestRequest request = new FakeRestRequest.Builder(xContentRegistry()).build(); @@ -364,11 +323,6 @@ public class BaseRestHandlerTests extends OpenSearchTestCase { public String getName() { return "test_unconsumed_body"; } - - @Override - public List routes() { - return Collections.emptyList(); - } }; try (XContentBuilder builder = JsonXContent.contentBuilder().startObject().endObject()) { diff --git a/server/src/test/java/org/opensearch/usage/UsageServiceTests.java b/server/src/test/java/org/opensearch/usage/UsageServiceTests.java index 59308d09b17..17b17a5deeb 100644 --- a/server/src/test/java/org/opensearch/usage/UsageServiceTests.java +++ b/server/src/test/java/org/opensearch/usage/UsageServiceTests.java @@ -40,8 +40,6 @@ import org.opensearch.test.OpenSearchTestCase; import org.opensearch.test.client.NoOpNodeClient; import org.opensearch.test.rest.FakeRestRequest; -import java.util.Collections; -import java.util.List; import java.util.Locale; import java.util.Map; @@ -200,11 +198,6 @@ public class UsageServiceTests extends OpenSearchTestCase { return name; } - @Override - public List routes() { - return Collections.emptyList(); - } - @Override protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) { return channel -> {