You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2010/03/05 22:33:37 UTC

[jira] Resolved: (IO-181) LineIterator should implement Iterable

     [ https://issues.apache.org/jira/browse/IO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved IO-181.
---------------------

    Resolution: Fixed

Applied the suggested change, with a warning in then Javadoc that the Reader is shared:

URL: http://svn.apache.org/viewvc?rev=919627&view=rev
Log:
IO-181 LineIterator should implement Iterable

Modified:
   commons/proper/io/trunk/src/java/org/apache/commons/io/LineIterator.java

Note - replaced LineIterator.closeQuietly(it) calls in Javadoc with it.close(), as the it field must be non-null in the finally clause.

> LineIterator should implement Iterable 
> ---------------------------------------
>
>                 Key: IO-181
>                 URL: https://issues.apache.org/jira/browse/IO-181
>             Project: Commons IO
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Michael Ernst
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> org.apache.commons.io.LineIterator does not implement Iterable.  This makes
> it impossible to use in certain stylized ways, such as in a new-style for
> statement.  Such use is not always desirable (it might temporarily leak a
> file descriptor, until the finalizer is called), but should be possible in
> situations where it is known to be acceptable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.