Skip to content

Commit

Permalink
Build Fix: Update Strings.toString to pass the JSON XContentType (#699)
Browse files Browse the repository at this point in the history
Signed-off-by: Ankit Kala <[email protected]>
  • Loading branch information
ankitkala committed Feb 22, 2023
1 parent e4f2143 commit a8a31d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.opensearch.common.xcontent.ObjectParser
import org.opensearch.common.xcontent.ToXContent
import org.opensearch.common.xcontent.XContentBuilder
import org.opensearch.common.xcontent.XContentParser
import org.opensearch.common.xcontent.XContentType
import org.opensearch.index.Index
import org.opensearch.persistent.PersistentTaskParams
import java.io.IOException
Expand Down Expand Up @@ -80,6 +81,6 @@ class IndexReplicationParams : PersistentTaskParams {
}

override fun toString(): String {
return Strings.toString(this)
return Strings.toString(XContentType.JSON, this)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import org.opensearch.common.xcontent.ObjectParser
import org.opensearch.common.xcontent.ToXContent
import org.opensearch.common.xcontent.XContentBuilder
import org.opensearch.common.xcontent.XContentParser
import org.opensearch.common.xcontent.XContentType
import org.opensearch.index.shard.ShardId
import org.opensearch.persistent.PersistentTaskParams
import java.io.IOException
Expand Down Expand Up @@ -84,7 +85,7 @@ class ShardReplicationParams : PersistentTaskParams {
}

override fun toString(): String {
return Strings.toString(this)
return Strings.toString(XContentType.JSON, this)
}

class Builder {
Expand Down Expand Up @@ -122,4 +123,4 @@ class ShardReplicationParams : PersistentTaskParams {
followerShardIdObj.id))
}
}
}
}

0 comments on commit a8a31d2

Please sign in to comment.