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

BufferedChecksumIndexInput is not cloneable

Details

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

    Description

      BufferedChecksumIndexInput implements Cloneable, yet its close method would return a shallow copy that still wraps the same IndexInput and Checksum. This is trappy, because reading on the clone would also read on the original instance and update the checksum.

      Since Checksum are not cloneable, I think ChecksumIndexInput.clone should just throw an UOE.

      Attachments

        1. LUCENE-5586.patch
          0.6 kB
          Adrien Grand
        2. LUCENE-5586.patch
          0.5 kB
          Adrien Grand

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: