tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Resource management patterns (Was: Tika leaves files open)
Date Thu, 01 Sep 2011 11:26:22 GMT

[update subject, move to dev@]

On Thu, Sep 1, 2011 at 12:41 PM, Uwe Schindler <uwe@thetaphi.de> wrote:
> With our internal Lucene IOUtils it's even simplier, see javadocs :-)

Yep, Lucene's version is certainly better.

> It's just a few lines more code.

It's still at least 7 lines of wrapper code compared to my 3 extra
lines over the ARM pattern in Java 7. And you need an extra variable
for each type of exceptions (what about Throwables?) that may be
thrown by the code in question. In Tika that would typically be at
least three variables, one each for IO-, SAX- and TikaExceptions.

I think that's too high a price to pay for the IMHO rather marginal
benefits. Let's wait for the upgrade to Java 7 and do it properly


Jukka Zitting

View raw message