Skip to content

Commit

Permalink
Change use of XContentType.fromMediaType to MediaType.fromMediaType
Browse files Browse the repository at this point in the history
Signed-off-by: monusingh-1 <[email protected]>
  • Loading branch information
monusingh-1 committed Jul 25, 2023
1 parent fa7b9c5 commit cd55a37
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cd55a37

Please sign in to comment.