diff --git a/src/main/java/org/opensearch/commons/InjectSecurity.java b/src/main/java/org/opensearch/commons/InjectSecurity.java index 8d27e07c..e6b283d9 100644 --- a/src/main/java/org/opensearch/commons/InjectSecurity.java +++ b/src/main/java/org/opensearch/commons/InjectSecurity.java @@ -14,10 +14,10 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.core.common.Strings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.commons.authuser.User; +import org.opensearch.core.common.Strings; /** * For background jobs usage only. User or Roles injection can be done using transport layer only. diff --git a/src/main/java/org/opensearch/commons/authuser/AuthUserRequestBuilder.java b/src/main/java/org/opensearch/commons/authuser/AuthUserRequestBuilder.java index 28fdd314..19811b5b 100644 --- a/src/main/java/org/opensearch/commons/authuser/AuthUserRequestBuilder.java +++ b/src/main/java/org/opensearch/commons/authuser/AuthUserRequestBuilder.java @@ -7,8 +7,8 @@ import org.opensearch.client.Request; import org.opensearch.client.RequestOptions; -import org.opensearch.core.common.Strings; import org.opensearch.commons.ConfigConstants; +import org.opensearch.core.common.Strings; public class AuthUserRequestBuilder { private final String auth; diff --git a/src/main/java/org/opensearch/commons/authuser/User.java b/src/main/java/org/opensearch/commons/authuser/User.java index 0e687042..d96d72a1 100644 --- a/src/main/java/org/opensearch/commons/authuser/User.java +++ b/src/main/java/org/opensearch/commons/authuser/User.java @@ -17,13 +17,13 @@ import org.apache.http.util.EntityUtils; import org.opensearch.client.Response; import org.opensearch.common.Nullable; -import org.opensearch.core.common.Strings; import org.opensearch.common.inject.internal.ToStringBuilder; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.Writeable; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java index 3d214719..c38e0dba 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java @@ -11,10 +11,10 @@ import java.util.Map; import org.apache.http.client.utils.URIBuilder; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.Strings; /** * This class holds the generic parameters required for a diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java index baa1b78a..52e18903 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java @@ -7,8 +7,8 @@ import java.io.IOException; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.Strings; /** * This class holds the contents of an Chime message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java index f5c26681..a5bd186d 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java @@ -12,9 +12,9 @@ import org.apache.http.client.methods.HttpPatch; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.Strings; /** * This class holds the content of an CustomWebhook message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java index d771187b..480ae76b 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java @@ -9,10 +9,10 @@ import java.net.URI; import java.util.List; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.commons.notifications.model.MethodType; +import org.opensearch.core.common.Strings; /** * This class holds the content of an CustomWebhook message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java index 5dc0db68..afef192c 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java @@ -7,10 +7,10 @@ import java.io.IOException; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.commons.destination.util.Util; +import org.opensearch.core.common.Strings; /** * This class holds the content of an SNS message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java index 7a9d6080..b42bd87e 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java @@ -7,8 +7,8 @@ import java.io.IOException; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.Strings; /** * This class holds the content of an Slack message diff --git a/src/main/java/org/opensearch/commons/destination/util/Util.java b/src/main/java/org/opensearch/commons/destination/util/Util.java index f6e5ea4f..a97f04b2 100644 --- a/src/main/java/org/opensearch/commons/destination/util/Util.java +++ b/src/main/java/org/opensearch/commons/destination/util/Util.java @@ -7,8 +7,8 @@ import java.util.regex.Pattern; -import org.opensearch.core.common.Strings; import org.opensearch.common.ValidationException; +import org.opensearch.core.common.Strings; public class Util { private Util() {} diff --git a/src/main/java/org/opensearch/commons/rest/SecureRestClientBuilder.java b/src/main/java/org/opensearch/commons/rest/SecureRestClientBuilder.java index 92c1174b..1c747025 100644 --- a/src/main/java/org/opensearch/commons/rest/SecureRestClientBuilder.java +++ b/src/main/java/org/opensearch/commons/rest/SecureRestClientBuilder.java @@ -33,9 +33,9 @@ import org.opensearch.client.RestClient; import org.opensearch.client.RestClientBuilder; import org.opensearch.client.RestHighLevelClient; -import org.opensearch.core.common.Strings; import org.opensearch.common.settings.Settings; import org.opensearch.commons.ConfigConstants; +import org.opensearch.core.common.Strings; /** * Provides builder to create low-level and high-level REST client to make calls to OpenSearch. diff --git a/src/test/java/org/opensearch/commons/authuser/UserTest.java b/src/test/java/org/opensearch/commons/authuser/UserTest.java index c6f917f2..3453d802 100644 --- a/src/test/java/org/opensearch/commons/authuser/UserTest.java +++ b/src/test/java/org/opensearch/commons/authuser/UserTest.java @@ -15,11 +15,11 @@ import java.util.Arrays; import org.junit.jupiter.api.Test; -import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.common.Strings; public class UserTest {