diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java index 76e2418e82..9a4735256e 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelReader.java @@ -53,7 +53,8 @@ public interface ModelReader throws IOException; /** - * Reads the model from the specified character reader. + * Reads the model from the specified character reader. The reader will be automatically closed before the method + * returns. * * @param input The reader to deserialize the model from, must not be {@code null}. * @param options The options to use for deserialization, may be {@code null} to use the default values. @@ -64,7 +65,8 @@ public interface ModelReader throws IOException; /** - * Reads the model from the specified byte stream. + * Reads the model from the specified byte stream. The stream will be automatically closed before the method + * returns. * * @param input The stream to deserialize the model from, must not be {@code null}. * @param options The options to use for deserialization, may be {@code null} to use the default values. diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java index 207385b062..481c113d85 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/io/ModelWriter.java @@ -48,7 +48,8 @@ public interface ModelWriter throws IOException; /** - * Writes the supplied model to the specified character writer. + * Writes the supplied model to the specified character writer. The writer will be automatically closed before the + * method returns. * * @param output The writer to serialize the model to, must not be {@code null}. * @param options The options to use for serialization, may be {@code null} to use the default values. @@ -59,7 +60,8 @@ public interface ModelWriter throws IOException; /** - * Writes the supplied model to the specified byte stream. + * Writes the supplied model to the specified byte stream. The stream will be automatically closed before the method + * returns. * * @param output The stream to serialize the model to, must not be {@code null}. * @param options The options to use for serialization, may be {@code null} to use the default values.