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

SolrClient.getByIds(ArrayList<String>) fails with class cast exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.1
    • 5.2
    • clients - java
    • None
    • Java 1.7

    Description

      In the getById(collection<String>) function SolrClient:1172

      reqParams.set("ids", (String[]) ids.toArray());
      throws a ClassCastException: Object[] cannot be cast to String[]

      The call for toArray should be changed to the typed version
      reqParams.set("ids", ids.toArray(new String[ids.size()]));

      Attachments

        1. SOLR-7514.patch
          16 kB
          Ramkumar Aiyengar

        Activity

          People

            andyetitmoves Ramkumar Aiyengar
            tomfarnworth Tom Farnworth
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: