Document using a try-with-resources, remove reference to deprecated
method.
MODIFY
src/main/java/org/apache/commons/io/FileUtils.java
src/main/java/org/apache/commons/io/FileUtils.java
@@ -2023,9 +2023,8 @@ public static LineIterator lineIterator(final File file) throws IOException {
* <p>
* This method opens an {@code InputStream} for the file.
* When you have finished with the iterator you should close the stream
- * to free internal resources. This can be done by calling the
- * {@link LineIterator#close()} or
- * {@link LineIterator#closeQuietly(LineIterator)} method.
+ * to free internal resources. This can be done by using a try-with-resources block or calling the
+ * {@link LineIterator#close()} method.
* </p>
* <p>
* The recommended usage pattern is:

MODIFY
src/main/java/org/apache/commons/io/IOUtils.java
src/main/java/org/apache/commons/io/IOUtils.java
@@ -1574,8 +1574,8 @@ public static int length(final Object[] array) {
* {@code LineIterator} holds a reference to the open
* {@code InputStream} specified here. When you have finished with
* the iterator you should close the stream to free internal resources.
- * This can be done by closing the stream directly, or by calling
- * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
+ * This can be done by using a try-with-resources block, closing the stream directly, or by calling
+ * {@link LineIterator#close()}.
* <p>
* The recommended usage pattern is:
* <pre>
@@ -1607,8 +1607,8 @@ public static LineIterator lineIterator(final InputStream input, final Charset c
* {@code LineIterator} holds a reference to the open
* {@code InputStream} specified here. When you have finished with
* the iterator you should close the stream to free internal resources.
- * This can be done by closing the stream directly, or by calling
- * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
+ * This can be done by using a try-with-resources block, closing the stream directly, or by calling
+ * {@link LineIterator#close()}.
* <p>
* The recommended usage pattern is:
* <pre>
@@ -1642,8 +1642,8 @@ public static LineIterator lineIterator(final InputStream input, final String ch
* {@code LineIterator} holds a reference to the open
* {@code Reader} specified here. When you have finished with the
* iterator you should close the reader to free internal resources.
- * This can be done by closing the reader directly, or by calling
- * {@link LineIterator#close()} or {@link LineIterator#closeQuietly(LineIterator)}.
+ * This can be done by using a try-with-resources block, closing the reader directly, or by calling
+ * {@link LineIterator#close()}.
* <p>
* The recommended usage pattern is:
* <pre>

Document using a try-with-resources, remove reference to deprecated
method.