From cd55a37d054963895adaa2cbc9c7b23a67783b9b Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Tue, 25 Jul 2023 12:25:54 +0530 Subject: [PATCH] Change use of XContentType.fromMediaType to MediaType.fromMediaType Signed-off-by: monusingh-1 --- .../kotlin/org/opensearch/replication/ReplicationHelpers.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt b/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt index eb5f6404..2d42a0d2 100644 --- a/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt +++ b/src/test/kotlin/org/opensearch/replication/ReplicationHelpers.kt @@ -25,7 +25,7 @@ import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue import org.opensearch.core.xcontent.DeprecationHandler import org.opensearch.core.xcontent.NamedXContentRegistry -import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.xcontent.MediaType import org.opensearch.test.OpenSearchTestCase.assertBusy import org.opensearch.test.rest.OpenSearchRestTestCase import org.junit.Assert @@ -96,7 +96,7 @@ fun RestHighLevelClient.startReplication(request: StartReplicationRequest, waitForNoInitializingShards() } fun getAckResponse(lowLevelResponse: Response): AcknowledgedResponse { - val xContentType = XContentType.fromMediaType(lowLevelResponse.entity.contentType) + val xContentType = MediaType.fromMediaType(lowLevelResponse.entity.contentType) val xcp = xContentType.xContent().createParser(NamedXContentRegistry.EMPTY, DeprecationHandler.IGNORE_DEPRECATIONS, lowLevelResponse.entity.content) return AcknowledgedResponse.fromXContent(xcp)