From cd105d9bc2e84ed388669edd99760ced39e421ac Mon Sep 17 00:00:00 2001 From: Varun Jain Date: Sun, 4 Dec 2022 17:04:48 -0800 Subject: [PATCH] Validate Detector Handle Request Signed-off-by: Varun Jain --- .../org/opensearch/ad/rest/RestValidateDetectorAction.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/opensearch/ad/rest/RestValidateDetectorAction.java b/src/main/java/org/opensearch/ad/rest/RestValidateDetectorAction.java index 67044e839..4baa74f45 100644 --- a/src/main/java/org/opensearch/ad/rest/RestValidateDetectorAction.java +++ b/src/main/java/org/opensearch/ad/rest/RestValidateDetectorAction.java @@ -53,11 +53,10 @@ public RestValidateDetectorAction(ExtensionsRunner runner, AnomalyDetectorExtens @Override protected List routeHandlers() { - return List.of(new RouteHandler(POST, "/detectors/_validate", (r) -> handleRequest(r))); + return List.of(new RouteHandler(POST, "/detectors/_validate", (r) -> handleValidateDetectorRequest(r))); } - @Override - public ExtensionRestResponse handleRequest(ExtensionRestRequest request) { + private ExtensionRestResponse handleValidateDetectorRequest(ExtensionRestRequest request) { if (!EnabledSetting.isADPluginEnabled()) { throw new IllegalStateException(CommonErrorMessages.DISABLED_ERR_MSG); }