Skip to content

Commit 072fa70

Browse files
author
Gary Gregory
committed
@SuppressWarnings and Javadoc.
1 parent d75f7eb commit 072fa70

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/org/apache/commons/io/FileUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,13 +2047,14 @@ public static LineIterator lineIterator(final File file) throws IOException {
20472047
*
20482048
* @param file the file to open for input, must not be {@code null}
20492049
* @param charsetName the name of the requested charset, {@code null} means platform default
2050-
* @return an Iterator of the lines in the file, never {@code null}
2050+
* @return a LineIterator for lines in the file, never {@code null}; MUST be closed by the caller.
20512051
* @throws NullPointerException if file is {@code null}.
20522052
* @throws FileNotFoundException if the file does not exist, is a directory rather than a regular file, or for some
20532053
* other reason cannot be opened for reading.
20542054
* @throws IOException if an I/O error occurs.
20552055
* @since 1.2
20562056
*/
2057+
@SuppressWarnings("resource") // Caller closes the result LineIterator.
20572058
public static LineIterator lineIterator(final File file, final String charsetName) throws IOException {
20582059
InputStream inputStream = null;
20592060
try {

0 commit comments

Comments
 (0)