Skip to content

Commit 039f71c

Browse files
martin-gaievskinavneet1v
authored andcommitted
Switch from XContentType to MediaType to fix compilation errors (opensearch-project#232)
Signed-off-by: Martin Gaievski <[email protected]>
1 parent e5cfab6 commit 039f71c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/opensearch/neuralsearch/OpenSearchSecureRestTestCase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.opensearch.common.util.concurrent.ThreadContext;
3232
import org.opensearch.common.xcontent.XContentType;
3333
import org.opensearch.core.xcontent.DeprecationHandler;
34+
import org.opensearch.core.xcontent.MediaType;
3435
import org.opensearch.core.xcontent.NamedXContentRegistry;
3536
import org.opensearch.core.xcontent.XContentParser;
3637
import org.opensearch.test.rest.OpenSearchRestTestCase;
@@ -131,7 +132,7 @@ protected boolean preserveIndicesUponCompletion() {
131132
@After
132133
public void deleteExternalIndices() throws IOException {
133134
final Response response = client().performRequest(new Request("GET", "/_cat/indices?format=json" + "&expand_wildcards=all"));
134-
final XContentType xContentType = XContentType.fromMediaType(response.getEntity().getContentType().getValue());
135+
final MediaType xContentType = MediaType.fromMediaType(String.valueOf(response.getEntity().getContentType()));
135136
try (
136137
final XContentParser parser = xContentType.xContent()
137138
.createParser(

0 commit comments

Comments
 (0)