This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git
The following commit(s) were added to refs/heads/master by this push: new cf4a926afe Revert "Upgrade to snakeyaml 2.0" cf4a926afe is described below commit cf4a926afef2887d818c41d65a91a4a9c95a1c27 Author: Andrew Gaul <g...@apache.org> AuthorDate: Wed May 10 21:30:27 2023 +0900 Revert "Upgrade to snakeyaml 2.0" This reverts commit f82e94c3374d7ced6d5a6a7d0238fe85a954ac3d. This break CI due to an unexpected Java version mismatch. --- apis/byon/pom.xml | 2 +- apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java | 3 +-- .../src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apis/byon/pom.xml b/apis/byon/pom.xml index 17b2183310..2f8a372e12 100644 --- a/apis/byon/pom.xml +++ b/apis/byon/pom.xml @@ -70,7 +70,7 @@ <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> - <version>2.0</version> + <version>1.32</version> </dependency> <dependency> <groupId>com.google.auto.service</groupId> diff --git a/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java b/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java index 5914dd63b1..8cbbdc09da 100644 --- a/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java +++ b/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java @@ -25,7 +25,6 @@ import java.util.Map; import org.jclouds.byon.Node; import org.jclouds.util.Closeables2; import org.yaml.snakeyaml.DumperOptions; -import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; @@ -112,7 +111,7 @@ public class YamlNode { InputStream in = null; try { in = byteSource.openStream(); - return (YamlNode) new Yaml(new Constructor(YamlNode.class, new LoaderOptions())).load(in); + return (YamlNode) new Yaml(new Constructor(YamlNode.class)).load(in); } catch (IOException ioe) { throw Throwables.propagate(ioe); } finally { diff --git a/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java b/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java index 4176b87a3a..18454e12f5 100644 --- a/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java +++ b/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java @@ -29,7 +29,6 @@ import javax.inject.Singleton; import org.jclouds.byon.Node; import org.jclouds.byon.domain.YamlNode; -import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.TypeDescription; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; @@ -81,7 +80,7 @@ public class NodesFromYamlStream implements Function<ByteSource, LoadingCache<St @Override public LoadingCache<String, Node> apply(ByteSource source) { - Constructor constructor = new Constructor(Config.class, new LoaderOptions()); + Constructor constructor = new Constructor(Config.class); TypeDescription nodeDesc = new TypeDescription(YamlNode.class); nodeDesc.putListPropertyType("tags", String.class);