You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ramkumar Aiyengar (JIRA)" <ji...@apache.org> on 2015/05/11 00:30:00 UTC
[jira] [Resolved] (SOLR-7514)
SolrClient.getByIds(ArrayList) fails with class cast exception
[ https://issues.apache.org/jira/browse/SOLR-7514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramkumar Aiyengar resolved SOLR-7514.
-------------------------------------
Resolution: Fixed
Fix Version/s: 5.2
Thanks for reporting Tom!
> 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
> Fix For: 5.2
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org