Skip to content

Commit

Permalink
Use MediaTypeRegistry
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Aug 7, 2023
1 parent 020b870 commit 6b9cc27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.core.xcontent.MediaTypeRegistry;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentType;

import java.io.IOException;
import java.time.Clock;
Expand Down Expand Up @@ -181,7 +181,7 @@ private XContentBuilder toXContentWithDelay(XContentBuilder builder) throws IOEx

@Override
public String toString() {
return Strings.toString(XContentType.JSON, this, false, true);
return Strings.toString(MediaTypeRegistry.JSON, this, false, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import org.opensearch.core.common.Strings;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.core.xcontent.MediaTypeRegistry;
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentType;

import java.io.IOException;
import java.time.Clock;
Expand Down Expand Up @@ -189,7 +189,7 @@ void setClock(Clock clock) {

@Override
public String toString() {
return Strings.toString(XContentType.JSON, this, false, true);
return Strings.toString(MediaTypeRegistry.JSON, this, false, true);
}

@Override
Expand Down

0 comments on commit 6b9cc27

Please sign in to comment.