[
https://issues.apache.org/jira/browse/SOLR-7514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ramkumar Aiyengar updated SOLR-7514:
------------------------------------
Attachment: SOLR-7514.patch
Patch with the fix. I have also shored up the tests a bit to catch this..
> SolrClient.getByIds(ArrayList<String>) fails with class cast exception
> ----------------------------------------------------------------------
>
> Key: SOLR-7514
> URL: https://issues.apache.org/jira/browse/SOLR-7514
> Project: Solr
> Issue Type: Bug
> Components: clients - java
> Affects Versions: 5.1
> Environment: Java 1.7
> Reporter: Tom Farnworth
> Assignee: Ramkumar Aiyengar
> Attachments: SOLR-7514.patch
>
>
> 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()]));
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]