[
https://issues.apache.org/jira/browse/LUCENE-6055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14204689#comment-14204689
]
Shai Erera commented on LUCENE-6055:
------------------------------------
bq. We may need to add a short notice to MIGRATE.txt in branch_5x
I'll add this:
{noformat}
Index: lucene/MIGRATE.txt
===================================================================
--- lucene/MIGRATE.txt (revision 1637816)
+++ lucene/MIGRATE.txt (working copy)
@@ -73,3 +73,9 @@
situations where some documents do not have values for fields wrapped in other
ValueSources. Users who want to preserve the previous behavior may need to
wrap
their ValueSources in a "DefFunction" along with a ConstValueSource of "0.0".
+
+## PayloadAttributeImpl.clone() (LUCENE-6055)
+
+PayloadAttributeImpl.clone() did a shallow clone which was incorrect, and was
+fixed to do a deep clone. If you require shallow cloning of the underlying
bytes,
+you should override PayloadAttributeImpl.clone() to do a shallow clone instead.
{noformat}
> PayloadAttribute.clone() should deep clone its BytesRef
> -------------------------------------------------------
>
> Key: LUCENE-6055
> URL: https://issues.apache.org/jira/browse/LUCENE-6055
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/index
> Reporter: Shai Erera
> Assignee: Shai Erera
> Fix For: Trunk, 5.x
>
> Attachments: LUCENE-6055.patch, LUCENE-6055.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]