From bfbf1ef4ef565fbcc9fede77023fe16dff385fc5 Mon Sep 17 00:00:00 2001 From: Martin Gaievski Date: Tue, 25 Jul 2023 18:34:28 +0200 Subject: [PATCH] Switch from XContentType to MediaType to fix compilation errors (#232) Signed-off-by: Martin Gaievski --- .../opensearch/neuralsearch/OpenSearchSecureRestTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java b/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java index 5a4f6d381..07f9e53d7 100644 --- a/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java +++ b/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java @@ -36,8 +36,8 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.concurrent.ThreadContext; -import org.opensearch.common.xcontent.XContentType; import org.opensearch.core.xcontent.DeprecationHandler; +import org.opensearch.core.xcontent.MediaType; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.test.rest.OpenSearchRestTestCase; @@ -150,7 +150,7 @@ protected boolean preserveIndicesUponCompletion() { @After public void deleteExternalIndices() throws IOException { final Response response = client().performRequest(new Request("GET", "/_cat/indices?format=json" + "&expand_wildcards=all")); - final XContentType xContentType = XContentType.fromMediaType(response.getEntity().getContentType()); + final MediaType xContentType = MediaType.fromMediaType(response.getEntity().getContentType()); try ( final XContentParser parser = xContentType.xContent() .createParser(