From 9140d5ce492a68339c93b52e7a8736e1f4bc59f0 Mon Sep 17 00:00:00 2001 From: Martin Gaievski Date: Mon, 24 Jul 2023 17:21:07 -0700 Subject: [PATCH] Switch from XContentType to MediaType to fix compilation errors Signed-off-by: Martin Gaievski --- .../opensearch/neuralsearch/OpenSearchSecureRestTestCase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java b/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java index 5a4f6d381..b0c15561a 100644 --- a/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java +++ b/src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java @@ -38,6 +38,7 @@ 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 +151,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(