From 4efa7693e30c7cc60614a008b68daff71b1f7424 Mon Sep 17 00:00:00 2001 From: owaiskazi19 Date: Wed, 1 Mar 2023 02:03:42 +0000 Subject: [PATCH] Bumps snakeyaml to 2.0 Signed-off-by: owaiskazi19 --- CHANGELOG.md | 1 + buildSrc/version.properties | 2 +- libs/x-content/licenses/snakeyaml-1.33.jar.sha1 | 1 - libs/x-content/licenses/snakeyaml-2.0.jar.sha1 | 1 + .../main/java/org/opensearch/extensions/ExtensionsManager.java | 3 +-- 5 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 libs/x-content/licenses/snakeyaml-1.33.jar.sha1 create mode 100644 libs/x-content/licenses/snakeyaml-2.0.jar.sha1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 00a213ee8508e..fad3e5df85521 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Dependencies - Bump `org.apache.logging.log4j:log4j-core` from 2.18.0 to 2.20.0 - Bump `com.azure:azure-storage-common` from 12.19.3 to 12.20.0 +- Bump `snakeyaml` from 1.33 to 2.0 ([#6511](https://github.com/opensearch-project/OpenSearch/pull/6511)) ### Changed - Require MediaType in Strings.toString API ([#6009](https://github.com/opensearch-project/OpenSearch/pull/6009)) diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 4241255bcbf6f..09a66401d5e76 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -9,7 +9,7 @@ spatial4j = 0.7 jts = 1.15.0 jackson = 2.14.2 jackson_databind = 2.14.2 -snakeyaml = 1.33 +snakeyaml = 2.0 icu4j = 70.1 supercsv = 2.4.0 # Update to 2.17.2+ is breaking OpenSearchJsonLayout (see https://issues.apache.org/jira/browse/LOG4J2-3562) diff --git a/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 b/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 deleted file mode 100644 index c8a323290e7ba..0000000000000 --- a/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -2cd0a87ff7df953f810c344bdf2fe3340b954c69 \ No newline at end of file diff --git a/libs/x-content/licenses/snakeyaml-2.0.jar.sha1 b/libs/x-content/licenses/snakeyaml-2.0.jar.sha1 new file mode 100644 index 0000000000000..d09dea5564729 --- /dev/null +++ b/libs/x-content/licenses/snakeyaml-2.0.jar.sha1 @@ -0,0 +1 @@ +3aab2116756442bf0d4cd1c089b24d34c3baa253 \ No newline at end of file diff --git a/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java b/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java index 323e0c7acd715..dd73797a0bc59 100644 --- a/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java +++ b/server/src/main/java/org/opensearch/extensions/ExtensionsManager.java @@ -67,7 +67,6 @@ import org.opensearch.transport.TransportService; import org.yaml.snakeyaml.Yaml; import org.opensearch.env.EnvironmentSettingsResponse; -import org.yaml.snakeyaml.constructor.SafeConstructor; /** * The main class for managing Extension communication with the OpenSearch Node. @@ -558,7 +557,7 @@ public String executor() { } private ExtensionsSettings readFromExtensionsYml(Path filePath) throws IOException { - Yaml yaml = new Yaml(new SafeConstructor()); + Yaml yaml = new Yaml(); try (InputStream inputStream = Files.newInputStream(filePath)) { Map obj = yaml.load(inputStream); if (obj == null) {