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

PayloadAttribute.clone() should deep clone its BytesRef

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10.3, 5.0, 6.0
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: