Skip to content

Commit c0cbe27

Browse files
committed
yaml ctors
1 parent 4a26e30 commit c0cbe27

File tree

1 file changed

+4
-3
lines changed
  • worldguard-core/src/main/java/com/sk89q/worldguard/protection/managers/storage/file

1 file changed

+4
-3
lines changed

worldguard-core/src/main/java/com/sk89q/worldguard/protection/managers/storage/file/YamlRegionFile.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
4242
import org.yaml.snakeyaml.DumperOptions;
4343
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
44+
import org.yaml.snakeyaml.LoaderOptions;
4445
import org.yaml.snakeyaml.Yaml;
4546
import org.yaml.snakeyaml.constructor.SafeConstructor;
4647
import org.yaml.snakeyaml.parser.ParserException;
@@ -89,7 +90,7 @@ public class YamlRegionFile implements RegionDatabase {
8990
options.setIndent(4);
9091
options.setDefaultFlowStyle(FlowStyle.AUTO);
9192

92-
ERROR_DUMP_YAML = new Yaml(new SafeConstructor(), new Representer(), options);
93+
ERROR_DUMP_YAML = new Yaml(new SafeConstructor(new LoaderOptions()), new Representer(new DumperOptions()), options);
9394
}
9495

9596
/**
@@ -322,7 +323,7 @@ private void setDomainData(Map<String, Object> domainData, String key, Set<?> do
322323
}
323324

324325
/**
325-
* Create a YAML processer instance.
326+
* Create a YAML processor instance.
326327
*
327328
* @param file the file
328329
* @return a processor instance
@@ -336,7 +337,7 @@ private YAMLProcessor createYamlProcessor(File file) {
336337
* Dump the given object as YAML for debugging purposes.
337338
*
338339
* @param object the object
339-
* @return the YAML string or an error string if dumping fals
340+
* @return the YAML string or an error string if dumping fails
340341
*/
341342
private static String toYamlOutput(Object object) {
342343
try {

0 commit comments

Comments
 (0)