Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-13249

ByteArrayUtf8CharSequence.getStringOrNull returns null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 7.7
    • Fix Version/s: 8.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                noble.paul Noble Paul
                Reporter:
                markus17 Markus Jelsma
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: