[
https://issues.apache.org/jira/browse/SOLR-17723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17941267#comment-17941267
]
ASF subversion and git services commented on SOLR-17723:
--------------------------------------------------------
Commit 83e98154029eeddc2645e79a922bd28337600728 in solr's branch
refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=83e98154029 ]
SOLR-17723: Use NamedList.forEach() or iterator() (#3295)
In order to be more Map-like.
And avoid some needless indexed method usages.
> NamedList: update most callers of indexed access with alternatives
> ------------------------------------------------------------------
>
> Key: SOLR-17723
> URL: https://issues.apache.org/jira/browse/SOLR-17723
> Project: Solr
> Issue Type: Improvement
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> A number of methods on NamedList are index based. – indexOf(key),
> getName(idx), getVal(idx), and more. For a number of reasons, _most_ (not
> all) callers should use alternatives, namely forEach or iterator(). Why:
> will lessen the scope of impact of transitioning many NamedList usages to
> Map. Map's methods are more familiar, and both forEach and iterator() are
> slightly easier to read than indexed access.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]