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

ByteArrayUtf8CharSequence.getStringOrNull returns null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 7.7
    • 8.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: