Solr
  1. Solr
  2. SOLR-696

NamedListCodec doesn't properly write Iterable items

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      The NamedListCodec doesn't properly write Iterable items on line 224. All the other instanceof checks return true, while that one falls through and returns false.

      Exception is:
      Caused by: java.lang.ClassCastException: java.util.ArrayList
      [java] at org.apache.solr.common.util.NamedListCodec.readNamedList(NamedListCodec.java:108)
      [java] at org.apache.solr.common.util.NamedListCodec.readVal(NamedListCodec.java:155)
      [java] at org.apache.solr.common.util.NamedListCodec.readOrderedMap(NamedListCodec.java:98)
      [java] at org.apache.solr.common.util.NamedListCodec.readVal(NamedListCodec.java:154)
      [java] at org.apache.solr.common.util.NamedListCodec.readOrderedMap(NamedListCodec.java:98)
      [java] at org.apache.solr.common.util.NamedListCodec.readVal(NamedListCodec.java:154)
      [java] at org.apache.solr.common.util.NamedListCodec.unmarshal(NamedListCodec.java:89)
      [java] at org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(BinaryResponseParser.java:39)
      [java] at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:385)

      Test and patch shortly

      1. SOLR-696.patch
        3 kB
        Grant Ingersoll

        Activity

        Hide
        Grant Ingersoll added a comment -

        Just for a little backfill, this came about using the SpellcheckComponent with the BinaryResponseParser used in SolrJ.

        Show
        Grant Ingersoll added a comment - Just for a little backfill, this came about using the SpellcheckComponent with the BinaryResponseParser used in SolrJ.
        Hide
        Grant Ingersoll added a comment -

        Adds return true in the Iterable clause and a test case.

        Show
        Grant Ingersoll added a comment - Adds return true in the Iterable clause and a test case.
        Hide
        Grant Ingersoll added a comment -

        Committed.

        Show
        Grant Ingersoll added a comment - Committed.

          People

          • Assignee:
            Grant Ingersoll
            Reporter:
            Grant Ingersoll
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development