From: JM Tinghir <jm.tinghir@gm...> - 2005-06-21 08:25:27
Once again, I'm not really sure about what I'll say...
I often got an error Exception, when I try to index a file that is in
a bad format (for any reason, today it is an excel file that seems to
have a problem) :
First an exception is caught by the Indexer, but the program keeps
going (and that's fine).
But then, an NullPointerException is caught when the IndexWriter tries
to close the writer (and stops the execution, which is not that fine)
When looking at the quoted line where the exception is caught, I saw
that it was in the finally block (for example in LuceneActions.index).
The problem is, I think, that there shouldn't be the writer.close()
instruction in both the catch and finally blocks. Actually the finally
block is always executed, so it should only be in this block and not
in the catch.
The same problem appears in a few methods in LuceneActions.