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 things -- Connection, Statement, ResultSet. This
is for the common case that some failure on closing something you're
done reading is... noteworthy but probably not a reason to just stop
immediately with an exception.
I didn't change any such calls where it seemed plausible that one
would definitely want to stop. Like unit tests.
On Wed, Sep 9, 2009 at 5:33 PM, Ted Dunning<[email protected]> wrote:
> How does IOUtils do this?
>
> On Wed, Sep 9, 2009 at 2:37 AM, Sean Owen (JIRA) <[email protected]> wrote:
>
>> > Uses IOUtils consistently to close Closeables,
>>
>
>
>
> --
> Ted Dunning, CTO
> DeepDyve
>