This is why we use the "modernized" Lucene IOUtils.closeSafely... (and
because Lucene has no external references).

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]


> -----Original Message-----
> From: Jukka Zitting [mailto:[email protected]]
> Sent: Thursday, September 01, 2011 11:56 AM
> To: [email protected]
> Subject: Re: Tika leaves files open
> 
> Hi,
> 
> On Thu, Sep 1, 2011 at 11:36 AM, Michael McCandless
> <[email protected]> wrote:
> > While rare for IS.close() to throw an exception, if it does, it's
> > quite awful because it masks the original exception.  It seems best to
> > be defensive?
> 
> With closeQuietly() you'd really be throwing information out in case where
> close() fails when no other exception has been thrown. Instead of one
exception
> masking another, you'd have no exceptions masking one!
> 
> BR,
> 
> Jukka Zitting

Reply via email to