[
https://issues.apache.org/jira/browse/LUCENE-7867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16059012#comment-16059012
]
Adrien Grand commented on LUCENE-7867:
--------------------------------------
Can you use {{BytesRef.deepCopyOf}} rather than {{BytesRef.clone}} when cloning
or copying payload attributes in {{CachedToken}} and solr.spelling's {{Token}}?
{{BytesRef.clone}} only performs a shallow copy, while analysis components
would typically modify the content of the underlying byte[] in place.
{{PayloadAttributeImpl}} already uses {{BytesRef.deepCopyOf}}.
Javadocs of {{NumericPayloadTokenFilter}} have a "T" at the beginning that
looks like a leftover.
Otherwise +1!
> Remove deprecated Token class
> -----------------------------
>
> Key: LUCENE-7867
> URL: https://issues.apache.org/jira/browse/LUCENE-7867
> Project: Lucene - Core
> Issue Type: Improvement
> Affects Versions: master (7.0)
> Reporter: Alan Woodward
> Assignee: Alan Woodward
> Attachments: LUCENE-7867.patch, LUCENE-7867.patch
>
>
> The Token class has been sitting around deprecated since 2.9. We should nuke
> it already.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]