You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2019/02/15 17:15:00 UTC
[jira] [Commented] (SOLR-13249)
ByteArrayUtf8CharSequence.getStringOrNull returns null
[ https://issues.apache.org/jira/browse/SOLR-13249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769515#comment-16769515 ]
Erick Erickson commented on SOLR-13249:
---------------------------------------
Flagged as related on the user's list, so adding here in case they can both be resolved with the same fix.
> ByteArrayUtf8CharSequence.getStringOrNull returns null
> -------------------------------------------------------
>
> Key: SOLR-13249
> URL: https://issues.apache.org/jira/browse/SOLR-13249
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 7.7
> Reporter: Markus Jelsma
> Priority: Minor
> Fix For: 8.0
>
>
> I have an URP that, in processAdd(), gets a field value via SolrInputField.getValue(). In a normal unit test this yields me a String. But in a distributed test i get a ByteArrayUtf8CharSequence.
> If it is a ByteArrayUtf8CharSequence the getStringOrNull() method always returns null unless some internal method called _getStr first.
> This is either by design or a mistake. If it is a mistake, then the fix is to use toString() and the getStringOrNull() method can be removed (it would become a duplicate for toString(). If it is by design, then nothing is obvious from the JavaDoc and it should clarify.
> This is since 7.7.0.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org