[
https://issues.apache.org/jira/browse/SOLR-11913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407783#comment-16407783
]
Tapan Vaishnav commented on SOLR-11913:
---------------------------------------
[~dsmiley]
Thanks for your review.
I have fixed the pointed out changes and attached as SOLR-11913_v2.patch.
Please, have a look whenever you get time.
> The key part as referenced in the description – having SolrParams implement
>Iterable wasn't done.
I thought that we had to implement the function not as in the _implements_
keyword.
> Why did you create SolrParams.getMapEntry? You could inline it to do an
> anonymous inner class
It wasn't creating any unnecessary new object and I thought that we might use
it in future but has been fixed now.
> Please override this for ModifiableSolrParams to return a more optimal
> implementation.
I have overridden the _iterator()_ from Iterable class for
ModifiableSolrParams. But there are other classes too which extend SolrParams
and need to be modified. Will do after the next review.
> SolrParams ought to implement Iterable<Map.Entry<String,String[]>>
> ------------------------------------------------------------------
>
> Key: SOLR-11913
> URL: https://issues.apache.org/jira/browse/SOLR-11913
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: David Smiley
> Priority: Minor
> Labels: newdev
> Attachments: SOLR-11913.patch, SOLR-11913_v2.patch
>
>
> SolrJ ought to implement {{Iterable<Map.Entry<String,String[]>>}} so that
> it's easier to iterate on it, either using Java 5 for-each style, or Java 8
> streams. The implementation on ModifiableSolrParams can delegate through to
> the underlying LinkedHashMap entry set. The default impl can produce a
> Map.Entry with a getValue that calls through to getParams.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]