From e95749c1ed8f49534e20c62d4714708113a7ce6f Mon Sep 17 00:00:00 2001 From: Roberto Cortez Date: Fri, 29 Nov 2024 12:52:59 +0000 Subject: [PATCH] Remove DumperOptions --- .../smallrye/config/source/yaml/YamlConfigSource.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sources/yaml/src/main/java/io/smallrye/config/source/yaml/YamlConfigSource.java b/sources/yaml/src/main/java/io/smallrye/config/source/yaml/YamlConfigSource.java index 4f017898f..da83142a7 100644 --- a/sources/yaml/src/main/java/io/smallrye/config/source/yaml/YamlConfigSource.java +++ b/sources/yaml/src/main/java/io/smallrye/config/source/yaml/YamlConfigSource.java @@ -15,7 +15,6 @@ import java.util.stream.Collectors; import org.eclipse.microprofile.config.spi.ConfigSource; -import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; @@ -36,14 +35,6 @@ public class YamlConfigSource extends MapBackedConfigSource { private static final String NAME_PREFIX = "YamlConfigSource[source="; private static final int ORDINAL = ConfigSource.DEFAULT_ORDINAL + 10; - private static final Yaml DUMPER; - - static { - final DumperOptions dumperOptions = new DumperOptions(); - dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.FLOW); - dumperOptions.setDefaultScalarStyle(DumperOptions.ScalarStyle.FOLDED); - DUMPER = new Yaml(dumperOptions); - } public YamlConfigSource(String name, Map source, int ordinal) { super(name, source, ordinal, false); @@ -153,6 +144,7 @@ private static void flattenYaml(String path, Map source, Map source, Map target) { boolean mixed = false; List flatten = new ArrayList<>();