diff --git a/src/main/java/wtf/beatrice/hidekobot/datasources/ConfigurationSource.java b/src/main/java/wtf/beatrice/hidekobot/datasources/ConfigurationSource.java index a2212f5..8744807 100644 --- a/src/main/java/wtf/beatrice/hidekobot/datasources/ConfigurationSource.java +++ b/src/main/java/wtf/beatrice/hidekobot/datasources/ConfigurationSource.java @@ -3,6 +3,7 @@ package wtf.beatrice.hidekobot.datasources; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; import wtf.beatrice.hidekobot.HidekoBot; @@ -63,7 +64,8 @@ public class ConfigurationSource } } // load the YAML file from the filesystem - Yaml fsConfigYaml = new Yaml(new SafeConstructor()); + LoaderOptions options = new LoaderOptions(); + Yaml fsConfigYaml = new Yaml(new SafeConstructor(options)); LinkedHashMap fsConfigContents = null; // map holding all file entries try (InputStream fsConfigStream = new FileInputStream(fsConfigFile)) { fsConfigContents = fsConfigYaml.load(fsConfigStream); }