This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 3799e501560de416ba40856dba12067d6aefbe90 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Oct 1 08:50:19 2023 -0400 Javadoc --- src/main/java/org/apache/commons/io/StreamIterator.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/commons/io/StreamIterator.java b/src/main/java/org/apache/commons/io/StreamIterator.java index 3a321681..eedcf706 100644 --- a/src/main/java/org/apache/commons/io/StreamIterator.java +++ b/src/main/java/org/apache/commons/io/StreamIterator.java @@ -23,8 +23,11 @@ import java.util.Objects; import java.util.stream.Stream; /** - * Wraps and presents a stream as a closable iterator resource that automatically closes itself when reaching the end - * of stream. + * Wraps and presents a stream as a closable {@link Iterator} resource that automatically closes itself when reaching the end of stream. + * <h2>Warning</h2> + * <p> + * In order to close the stream, the call site MUST either close the stream it allocated OR call the iterator until the end. + * </p> * * @param <E> The stream and iterator type. * @since 2.9.0 @@ -32,15 +35,13 @@ import java.util.stream.Stream; final class StreamIterator<E> implements Iterator<E>, Closeable { /** - * Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of - * stream. + * Wraps and presents a stream as a closable resource that automatically closes itself when reaching the end of stream. * <h2>Warning</h2> * <p> - * In order to close the stream, the call site MUST either close the stream it allocated OR call the iterator until - * the end. + * In order to close the stream, the call site MUST either close the stream it allocated OR call the iterator until the end. * </p> * - * @param <T> The stream and iterator type. + * @param <T> The stream and iterator type. * @param stream The stream iterate. * @return A new iterator. */