Skip to content

Commit

Permalink
Switch from XContentType to MediaType to fix compilation errors (open…
Browse files Browse the repository at this point in the history
…search-project#232)

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
  • Loading branch information
martin-gaievski authored and navneet1v committed Aug 17, 2023
1 parent e5cfab6 commit 039f71c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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;
Expand Down Expand Up @@ -131,7 +132,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().getValue());
final MediaType xContentType = MediaType.fromMediaType(String.valueOf(response.getEntity().getContentType()));
try (
final XContentParser parser = xContentType.xContent()
.createParser(
Expand Down

0 comments on commit 039f71c

Please sign in to comment.