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

PayloadAttribute.clone() should deep clone its BytesRef

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.10.3, 5.0, 6.0
    • core/index
    • None
    • New, Patch Available

    Description

      PayloadAttribute.clone() does a shallow clone, unlike e.g. CharTermAttribute. Attributes should deep clone, otherwise capturing state isn't correct. In addition, both PA's and CTA's .clone() falsely documents that they do shallow cloning on purposes, so need to fix that too.

      Attachments

        1. LUCENE-6055.patch
          3 kB
          Shai Erera
        2. LUCENE-6055.patch
          4 kB
          Shai Erera

        Issue Links

          Activity

            People

              shaie Shai Erera
              shaie Shai Erera
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: