You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/09/03 13:54:50 UTC
[commons-io] branch master updated: @SuppressWarnings and Javadoc.
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
The following commit(s) were added to refs/heads/master by this push:
new 072fa70 @SuppressWarnings and Javadoc.
072fa70 is described below
commit 072fa707f7cd41a70bcec644e1b393e3955dcc75
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Sep 3 09:54:48 2021 -0400
@SuppressWarnings and Javadoc.
---
src/main/java/org/apache/commons/io/FileUtils.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java
index 409cd20..de35e63 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -2047,13 +2047,14 @@ public class FileUtils {
*
* @param file the file to open for input, must not be {@code null}
* @param charsetName the name of the requested charset, {@code null} means platform default
- * @return an Iterator of the lines in the file, never {@code null}
+ * @return a LineIterator for lines in the file, never {@code null}; MUST be closed by the caller.
* @throws NullPointerException if file is {@code null}.
* @throws FileNotFoundException if the file does not exist, is a directory rather than a regular file, or for some
* other reason cannot be opened for reading.
* @throws IOException if an I/O error occurs.
* @since 1.2
*/
+ @SuppressWarnings("resource") // Caller closes the result LineIterator.
public static LineIterator lineIterator(final File file, final String charsetName) throws IOException {
InputStream inputStream = null;
try {