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
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
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
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
[
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
> --