From 14b6074668f17017f82aa789ac7535ea3f4c9796 Mon Sep 17 00:00:00 2001 From: miguel-vila Date: Mon, 3 Jun 2024 12:10:16 -0500 Subject: [PATCH] fix for java 8 Signed-off-by: miguel-vila --- .../opensearch/ingest/TextEmbeddingProcessorTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/ingest/TextEmbeddingProcessorTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/ingest/TextEmbeddingProcessorTest.java index fd06385260..088fc59f82 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/ingest/TextEmbeddingProcessorTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/ingest/TextEmbeddingProcessorTest.java @@ -13,13 +13,17 @@ package org.opensearch.client.opensearch.ingest; +import java.util.HashMap; import java.util.Map; import org.junit.Test; import org.opensearch.client.opensearch.model.ModelTestCase; public class TextEmbeddingProcessorTest extends ModelTestCase { - private static final Map baseFieldMap = Map.of("input_field", "vector_field"); + private static final Map baseFieldMap = new HashMap<>(); + static { + baseFieldMap.put("input_field", "vector_field"); + } private static TextEmbeddingProcessor.Builder baseTextEmbeddingProcessor() { return new TextEmbeddingProcessor.Builder().modelId("modelId").fieldMap(baseFieldMap).tag("some-tag");