From e00bcd0df64123b0ddde2b437cba384eb2afb5af Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 11 Dec 2023 17:28:01 +0000 Subject: [PATCH] Build with JDK 17 Signed-off-by: Tyler Ohlsen --- .../ad/client/AnomalyDetectionNodeClient.java | 18 ++++++------------ .../AnomalyDetectionNodeClientTests.java | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/opensearch/ad/client/AnomalyDetectionNodeClient.java b/src/main/java/org/opensearch/ad/client/AnomalyDetectionNodeClient.java index abb57d84f..a9d690ca1 100644 --- a/src/main/java/org/opensearch/ad/client/AnomalyDetectionNodeClient.java +++ b/src/main/java/org/opensearch/ad/client/AnomalyDetectionNodeClient.java @@ -21,21 +21,15 @@ public AnomalyDetectionNodeClient(Client client) { @Override public void searchAnomalyDetectors(SearchRequest searchRequest, ActionListener listener) { - this.client - .execute( - SearchAnomalyDetectorAction.INSTANCE, - searchRequest, - ActionListener.wrap(searchResponse -> { listener.onResponse(searchResponse); }, listener::onFailure) - ); + this.client.execute(SearchAnomalyDetectorAction.INSTANCE, searchRequest, ActionListener.wrap(searchResponse -> { + listener.onResponse(searchResponse); + }, listener::onFailure)); } @Override public void searchAnomalyResults(SearchRequest searchRequest, ActionListener listener) { - this.client - .execute( - SearchAnomalyResultAction.INSTANCE, - searchRequest, - ActionListener.wrap(searchResponse -> { listener.onResponse(searchResponse); }, listener::onFailure) - ); + this.client.execute(SearchAnomalyResultAction.INSTANCE, searchRequest, ActionListener.wrap(searchResponse -> { + listener.onResponse(searchResponse); + }, listener::onFailure)); } } diff --git a/src/test/java/org/opensearch/ad/client/AnomalyDetectionNodeClientTests.java b/src/test/java/org/opensearch/ad/client/AnomalyDetectionNodeClientTests.java index ba6ebda3c..e8a64c92a 100644 --- a/src/test/java/org/opensearch/ad/client/AnomalyDetectionNodeClientTests.java +++ b/src/test/java/org/opensearch/ad/client/AnomalyDetectionNodeClientTests.java @@ -22,8 +22,8 @@ import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.PlainActionFuture; -import org.opensearch.ad.constant.ADCommonName; import org.opensearch.ad.HistoricalAnalysisIntegTestCase; +import org.opensearch.ad.constant.ADCommonName; import org.opensearch.ad.model.AnomalyDetector; import org.opensearch.ad.model.AnomalyDetectorType; import org.opensearch.index.query.BoolQueryBuilder;