You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/04/05 17:21:00 UTC
[jira] [Commented] (SOLR-17723) NamedList: update most callers of indexed access with alternatives
[ 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: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org