lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-6976) BytesTermAttributeImpl.copyTo NPEs when the BytesRef is null
Date Wed, 10 Feb 2016 15:57:18 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-6976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael McCandless updated LUCENE-6976:
---------------------------------------
    Fix Version/s: 5.4.2

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message