Skip to content

Commit

Permalink
Fixing Strings (opensearch-project#321)
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Palis <jpalis@amazon.com>
  • Loading branch information
joshpalis authored Feb 21, 2023
1 parent a4bcc24 commit b64b743
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentParser;
import org.opensearch.common.xcontent.XContentParserUtils;
import org.opensearch.common.xcontent.XContentType;
import org.opensearch.index.seqno.SequenceNumbers;

import java.io.IOException;
Expand Down Expand Up @@ -173,7 +174,7 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa

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

public String getLockId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.opensearch.common.io.stream.StreamInput;
import org.opensearch.common.io.stream.StreamOutput;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentType;

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

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

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.opensearch.common.io.stream.StreamInput;
import org.opensearch.common.io.stream.StreamOutput;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentType;

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

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

@Override
Expand Down

0 comments on commit b64b743

Please sign in to comment.