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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: