Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3150

Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 4.9, 6.0
    • None
    • None
    • New

    Description

      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.

      Attachments

        1. LUCENE-3150.patch
          17 kB
          Simon Willnauer

        Activity

          People

            Unassigned Unassigned
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: