Skip to content

Commit

Permalink
Update import to Strings in response to #9103 from core (#456)
Browse files Browse the repository at this point in the history
* Update import to Strings in response to #9103 from core

Signed-off-by: Craig Perkins <[email protected]>

* Use MediaTypeRegistry

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks authored Aug 8, 2023
1 parent 7713355 commit f729e5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import com.cronutils.model.time.ExecutionTime;
import com.cronutils.parser.CronParser;
import com.cronutils.utils.VisibleForTesting;
import org.opensearch.common.Strings;
import org.opensearch.common.collect.Tuple;
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 @@ -9,13 +9,13 @@
package org.opensearch.jobscheduler.spi.schedule;

import com.cronutils.utils.VisibleForTesting;
import org.opensearch.common.Strings;
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.collect.Tuple;
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 f729e5d

Please sign in to comment.