Skip to content

Commit

Permalink
Changed Arrays.asList to Collections.singletonList to avoid Unsupport…
Browse files Browse the repository at this point in the history
…edOperationException

Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
  • Loading branch information
nathaliellenaa committed Jan 29, 2025
1 parent 32069da commit 7dc5548
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import static org.opensearch.ml.utils.TestHelper.getMetricsCorrelationRestRequest;

import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -385,7 +385,7 @@ public void testAnomalyLocalizationExecutionResponse() throws Exception {
bucket1.setOverallAggValue(65.0);

Result result = new Result();
result.setBuckets(Arrays.asList(bucket1));
result.setBuckets(Collections.singletonList(bucket1));

AnomalyLocalizationOutput output = new AnomalyLocalizationOutput();
Map<String, Result> results = new HashMap<>();
Expand Down

0 comments on commit 7dc5548

Please sign in to comment.