Skip to content

Commit

Permalink
pr change 1
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
  • Loading branch information
nknize committed Jan 25, 2023
1 parent ed67a95 commit 93e3cef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,7 @@ default String typeWithSubtype() {
return type() + "/" + subtype();
}

XContent xContent();

XContentBuilder contentBuilder() throws IOException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ public String mediaType() {
return mediaTypeWithoutParameters();
}

public abstract XContent xContent();

public abstract String mediaTypeWithoutParameters();

@Override
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/org/opensearch/common/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ private static String toString(MediaType mediaType, ToXContent toXContent, ToXCo
}

private static XContentBuilder createBuilder(MediaType mediaType, boolean pretty, boolean human) throws IOException {
XContentBuilder builder = mediaType.contentBuilder();
XContentBuilder builder = XContentBuilder.builder(mediaType.xContent());
if (pretty) {
builder.prettyPrint();
}
Expand Down

0 comments on commit 93e3cef

Please sign in to comment.