[
https://issues.apache.org/jira/browse/LUCENE-6976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141098#comment-15141098
]
ASF subversion and git services commented on LUCENE-6976:
---------------------------------------------------------
Commit 7d52c2523c7a4ff70612742b76b934a12b493331 in lucene-solr's branch
refs/heads/branch_5_4 from [~dsmiley]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7d52c25 ]
LUCENE-6976 SOLR-8541: BytesTermAttributeImpl.copyTo could NPE.
Could be triggered by trying to highlight a spatial RPT field.
git-svn-id:
https://svn.apache.org/repos/asf/lucene/dev/branches/branch_5x@1724877
13f79535-47bb-0310-9956-ffa450edef68
Conflicts:
lucene/CHANGES.txt
solr/CHANGES.txt
> BytesTermAttributeImpl.copyTo NPEs when the BytesRef is null
> ------------------------------------------------------------
>
> Key: LUCENE-6976
> URL: https://issues.apache.org/jira/browse/LUCENE-6976
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Minor
> Fix For: 5.5, 5.4.2
>
> Attachments: LUCENE_6976.patch, LUCENE_6976.patch
>
>
> The BytesTermAttributeImpl class, not used much I think, has a problem in its
> copyTo method in which it assumes "bytes" isn't null since it calls
> BytesRef.deepCopyOf on it. Perhaps deepCopyOf should support null? And
> also, toString(), equals() and hashCode() aren't implemented but we can do so.
> This was discovered in SOLR-8541; the spatial PrefixTreeStrategy uses this
> attribute and the CachingTokenFilter when used on the analysis chain will
> call clearAttributes() in it's end() method and then capture the state so it
> can be replayed later. BytesTermAttributeImpl.clear() nulls out the bytes
> reference.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]