lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LUCENE-3150) Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException
Date Sat, 28 May 2011 16:25:47 GMT
Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException
----------------------------------------------------------------------------------------

                 Key: LUCENE-3150
                 URL: https://issues.apache.org/jira/browse/LUCENE-3150
             Project: Lucene - Java
          Issue Type: Bug
            Reporter: Michael McCandless
            Priority: Minor
             Fix For: 3.3, 4.0


In various places we catch Throwable and suppress it, usually in exception handlers where
we want to just throw the first exc we had hit.

But this is dangerous for a thread interrupt since it means we can swallow & ignore the
interrupt.

We should at least catch the interrupt & restore the interrupt bit, if we can't rethrow
it.

One example is in SegmentInfos where we write the segments.gen file... there are many other
examples in SegmentInfos too.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message