From f729e5d50960d8edbe251118030e3fc7ae329252 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Tue, 8 Aug 2023 11:10:21 -0400 Subject: [PATCH] Update import to Strings in response to #9103 from core (#456) * Update import to Strings in response to #9103 from core Signed-off-by: Craig Perkins * Use MediaTypeRegistry Signed-off-by: Craig Perkins --------- Signed-off-by: Craig Perkins --- .../opensearch/jobscheduler/spi/schedule/CronSchedule.java | 6 +++--- .../jobscheduler/spi/schedule/IntervalSchedule.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/CronSchedule.java b/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/CronSchedule.java index 36ef91ac..acf7eade 100644 --- a/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/CronSchedule.java +++ b/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/CronSchedule.java @@ -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; @@ -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 diff --git a/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/IntervalSchedule.java b/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/IntervalSchedule.java index e696e224..e4e8ef4d 100644 --- a/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/IntervalSchedule.java +++ b/spi/src/main/java/org/opensearch/jobscheduler/spi/schedule/IntervalSchedule.java @@ -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; @@ -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