commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38083] - [io][PATCH] Iterate over the lines in a file and the files in a directory
Date Thu, 05 Jan 2006 22:31:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38083>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38083





------- Additional Comments From niallp@apache.org  2006-01-05 23:31 -------
(In reply to comment #7)
> I think it's better if you declare a return type of LineIterator. This way, no
> casts are necessary. 

I'm neutral on that, but if thats whats required I'm happy to attach a new 
version on that basis. Probably would be better if its an IOIterator, rather 
than LineIterator though? I wasn't sure whether the having IOIterator that 
extends Iterator to add a close() method or a separate interface with just the 
close() was desired. Guess if the consensus is with you then better to extend 
Iterator, otherwise it would have to return the implementation rather than the 
type.

> Iterator i = FileUtils.lineIterator( blah );
> Those who do will say
> LineIterator i = FileUtils.lineIterator( blah );

 IOIterator i = FileUtils.lineIterator( blah );

> Regards,
> James

The other thing I wondered was maybe its better to have a new RuntimeException 
that includes the "cause" (I assume io is JDK 1.3 dependant, and not 1.4) 
rather than trapping IOException and re-throwing IllegalStateException with 
just the message.

Niall

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message