diff --git a/src/com/esotericsoftware/yamlbeans/YamlReader.java b/src/com/esotericsoftware/yamlbeans/YamlReader.java index 291104d..46067a2 100644 --- a/src/com/esotericsoftware/yamlbeans/YamlReader.java +++ b/src/com/esotericsoftware/yamlbeans/YamlReader.java @@ -46,7 +46,7 @@ /** Deserializes Java objects from YAML. * @author Nathan Sweet */ -public class YamlReader { +public class YamlReader implements AutoCloseable { private final YamlConfig config; Parser parser; private final Map anchors = new HashMap(); diff --git a/src/com/esotericsoftware/yamlbeans/YamlWriter.java b/src/com/esotericsoftware/yamlbeans/YamlWriter.java index ba34909..9fee0f6 100644 --- a/src/com/esotericsoftware/yamlbeans/YamlWriter.java +++ b/src/com/esotericsoftware/yamlbeans/YamlWriter.java @@ -47,7 +47,7 @@ /** Serializes Java objects as YAML. * @author Nathan Sweet */ -public class YamlWriter { +public class YamlWriter implements AutoCloseable { private final YamlConfig config; private final Emitter emitter; private boolean started;