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

FilterDirectoryReader.doClose() should call in.close() not in.doClose()

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.3
    • None
    • None
    • New

    Description

      FilterDirectoryReader.doClose() calls in.doClose(). This is wrong because if you call close() on both the underlying reader and a wrapper around it, then doClose() will have been called several times, which will break ref counting.

      Instead, FilterDirectoryReader.doClose() should call in.close() so that it is a no-op if the underlying reader is already closed, or so that calling close() on the underlying reader afterwards will be a no-op.

      Attachments

        1. LUCENE-6696.patch
          4 kB
          Adrien Grand

        Activity

          People

            jpountz Adrien Grand
            jpountz Adrien Grand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: