You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tom Farnworth (JIRA)" <ji...@apache.org> on 2015/05/08 16:38:00 UTC
[jira] [Updated] (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 ]
Tom Farnworth updated SOLR-7514:
--------------------------------
Summary: SolrClient.getByIds(ArrayList<String>) fails with class cast exception (was: SolrClient.getByIds(ArrayList<String> fails with class cast exception)
> 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
>
> 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