Re: [jira] Updated: (MAHOUT-175) Use IOUtils, FileLineIterable/Iterator across the project

2009-09-09 Thread Ted Dunning
Cool. It just suddenly sounded like finalizers were creeping in with the assumption that they would handle closing files. On Wed, Sep 9, 2009 at 9:37 AM, Sean Owen wrote: > It just packs up this... > ... > That's 7 lines I don't need to repeat all over the place. > -- Ted Dunning, CTO DeepD

Re: [jira] Updated: (MAHOUT-175) Use IOUtils, FileLineIterable/Iterator across the project

2009-09-09 Thread Sean Owen
Not sure I really highlighted the punchline, reason it might ever matter -- if you have more than one Closeable to close() in a block, you probably need to do something like this. If the first one fails to close, you miss closing the second. Unless you write some funky nested finally blocks and suc

Re: [jira] Updated: (MAHOUT-175) Use IOUtils, FileLineIterable/Iterator across the project

2009-09-09 Thread Sean Owen
It just packs up this... if (closeable != null) { try { closeable.close(); } catch (IOException ioe) { log.warning(ioe); } } That's 7 lines I don't need to repeat all over the place. It came in very handy to convert 3x7 = 21 such lines into 1 since a JDBC call involves 3 closeable t

Re: [jira] Updated: (MAHOUT-175) Use IOUtils, FileLineIterable/Iterator across the project

2009-09-09 Thread Ted Dunning
How does IOUtils do this? On Wed, Sep 9, 2009 at 2:37 AM, Sean Owen (JIRA) wrote: > > Uses IOUtils consistently to close Closeables, > -- Ted Dunning, CTO DeepDyve

[jira] Updated: (MAHOUT-175) Use IOUtils, FileLineIterable/Iterator across the project

2009-09-09 Thread Sean Owen (JIRA)
[ https://issues.apache.org/jira/browse/MAHOUT-175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Owen updated MAHOUT-175: - Attachment: MAHOUT-175.patch > Use IOUtils, FileLineIterable/Iterator across the project > --