Skip to content

Commit 69faa8f

Browse files
author
Stephen Colebourne
committed
Fix javadoc and method return type
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@383206 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7f80aeb commit 69faa8f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/java/org/apache/commons/io/IOUtils.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,19 +509,25 @@ public static List readLines(Reader input) throws IOException {
509509
//-----------------------------------------------------------------------
510510
/**
511511
* Return an Iterator for the lines in a <code>Reader</code>.
512+
* Please read the javadoc of {@link LineIterator} to understand
513+
* whether you should close the iterator.
514+
* The file is closed if an exception is thrown.
512515
*
513516
* @param reader the <code>Reader</code> to read from, not null
514517
* @return an Iterator of the lines in the reader, never null
515518
* @throws NullPointerException if the reader is null
516519
* @since Commons IO 1.2
517520
*/
518-
public static Iterator lineIterator(Reader reader) {
521+
public static LineIterator lineIterator(Reader reader) {
519522
return new LineIterator(reader);
520523
}
521524

522525
/**
523526
* Return an Iterator for the lines in an <code>InputStream</code>, using
524527
* the character encoding specified (or default encoding if null).
528+
* Please read the javadoc of {@link LineIterator} to understand
529+
* whether you should close the iterator.
530+
* The file is closed if an exception is thrown.
525531
*
526532
* @param input the <code>InputStream</code> to read from, not null
527533
* @param encoding the encoding to use, null means platform default

0 commit comments

Comments
 (0)