[
https://issues.apache.org/jira/browse/SOLR-11913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16410710#comment-16410710
]
David Smiley commented on SOLR-11913:
-------------------------------------
You're getting there Tapan!
Typo in test name: testMapEntyrIterators
Now, quoting the description where I mentioned one detail not done...
bq. The default impl can produce a Map.Entry with a getValue that calls through
to getParams.
Instead I see that you're calling getParams eagerly. The distinction is that
callers that only care about certain named params will needlessly pay a cost to
getParams for parameters that aren't even needed.
BTW try {{ant precommit}}. Hopefully it'll show you that you need to use
{{\@Override}}
Can you please try updating some callers of getParameterNamesIterator to see
which of those would be good candidates to renovate to use the Java 5 for-each
style? Perhaps do everything but Solr "core" (i.e. just SolrJ + contribs)
which can be tested in less time than running "ant test" on everything.
Although you did add a unit test which is nice, there's nothing like real-world
usage through other code that needs to use it.
> 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.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]