From 464f03b08e21ff449b9a12a471094cdd8ea17bad Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 17:29:48 -0500 Subject: [PATCH] [Backport 2.x] [Refactor] Sets util from server to common lib (#7090) (#8230) Refactors the Sets utility class from the server module to the common library. Signed-off-by: Nicholas Walter Knize (cherry picked from commit b5d9a3f872fdbc676d610e574100bc5bb134241d) Signed-off-by: github-actions[bot] * update changelog Signed-off-by: Nicholas Walter Knize --------- Signed-off-by: Nicholas Walter Knize Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: Nicholas Walter Knize --- CHANGELOG.md | 1 + libs/common/build.gradle | 4 ++++ .../src/main/java/org/opensearch/common/util/set/Sets.java | 0 .../java/org/opensearch/common/util/set/package-info.java | 0 4 files changed, 5 insertions(+) rename {server => libs/common}/src/main/java/org/opensearch/common/util/set/Sets.java (100%) rename {server => libs/common}/src/main/java/org/opensearch/common/util/set/package-info.java (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2fd4fde8e93e..73ef05688fb8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Allow insecure string settings to warn-log usage and advise to migration of a newer secure variant ([#5496](https://github.com/opensearch-project/OpenSearch/pull/5496)) - Pass localNode info to all plugins on node start ([#7919](https://github.com/opensearch-project/OpenSearch/pull/7919) - Compress and cache cluster state during validate join request ([#7321](https://github.com/opensearch-project/OpenSearch/pull/7321)) +- [Refactor] Sets util from server to common lib ([#8230](https://github.com/opensearch-project/OpenSearch/pull/8230)) ### Deprecated diff --git a/libs/common/build.gradle b/libs/common/build.gradle index c0e9648617b7d..003a04ad4bfa7 100644 --- a/libs/common/build.gradle +++ b/libs/common/build.gradle @@ -32,6 +32,10 @@ dependencies { } } +tasks.withType(JavaCompile).configureEach { + options.compilerArgs -= '-Xlint:unchecked' +} + tasks.named('forbiddenApisMain').configure { // :libs:opensearch-common does not depend on server // TODO: Need to decide how we want to handle for forbidden signatures with the changes to server diff --git a/server/src/main/java/org/opensearch/common/util/set/Sets.java b/libs/common/src/main/java/org/opensearch/common/util/set/Sets.java similarity index 100% rename from server/src/main/java/org/opensearch/common/util/set/Sets.java rename to libs/common/src/main/java/org/opensearch/common/util/set/Sets.java diff --git a/server/src/main/java/org/opensearch/common/util/set/package-info.java b/libs/common/src/main/java/org/opensearch/common/util/set/package-info.java similarity index 100% rename from server/src/main/java/org/opensearch/common/util/set/package-info.java rename to libs/common/src/main/java/org/opensearch/common/util/set/package-info.java