Skip to content

Commit

Permalink
Remove DumperOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
radcortez committed Nov 29, 2024
1 parent 1841dbe commit e95749c
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<String, String> source, int ordinal) {
super(name, source, ordinal, false);
Expand Down Expand Up @@ -153,6 +144,7 @@ private static void flattenYaml(String path, Map<Object, Object> source, Map<Str
});
}

// Do not remove this, because Quarkus old ConfigRoots still rely on comma separated values calling Config#getValue and not Config#getValues.
private static void flattenList(String key, List<Object> source, Map<String, String> target) {
boolean mixed = false;
List<String> flatten = new ArrayList<>();
Expand Down

0 comments on commit e95749c

Please sign in to comment.