Skip to content

Commit

Permalink
Switch from XContentType to MediaType to fix compilation errors (#232)
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Gaievski <gaievski@amazon.com>
  • Loading branch information
martin-gaievski committed Jul 25, 2023
1 parent a9adfe0 commit bfbf1ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit bfbf1ef

Please sign in to comment.