SPIGOT-7161: SnakeYaml 1.32 changed the default file size limit

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2022-10-09 11:40:29 +11:00
parent f7fac3540b
commit cc4b84e4fb

View File

@ -64,6 +64,7 @@ public class YamlConfiguration extends FileConfiguration {
yamlDumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
yamlLoaderOptions = new LoaderOptions();
yamlLoaderOptions.setMaxAliasesForCollections(Integer.MAX_VALUE); // SPIGOT-5881: Not ideal, but was default pre SnakeYAML 1.26
yamlLoaderOptions.setCodePointLimit(Integer.MAX_VALUE); // SPIGOT-7161: Not ideal, but was default pre SnakeYAML 1.32
yaml = new BukkitYaml(constructor, representer, yamlDumperOptions, yamlLoaderOptions);
}