fix build
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2025-03-09 11:07:00 +01:00
parent 549f8bb48b
commit 35f52ec583

View File

@@ -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<String, Object> fsConfigContents = null; // map holding all file entries
try (InputStream fsConfigStream = new FileInputStream(fsConfigFile))
{ fsConfigContents = fsConfigYaml.load(fsConfigStream); }