You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2008/07/08 19:50:31 UTC
[jira] Issue Comment Edited: (SOLR-621) Add a getAll method to
NamedList
[ https://issues.apache.org/jira/browse/SOLR-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611713#action_12611713 ]
yseeley@gmail.com edited comment on SOLR-621 at 7/8/08 10:48 AM:
------------------------------------------------------------
Micro-optimization: since names will often be interned (constants), you could replace this code
{code}
+ if (name == null) {
+ if (n == null) {
+ result.add(getVal(i));
+ }
+ } else if (name.equals(n)) {
+ result.add(getVal(i));
+ }
{code}
with something like this:
{code}
+ if (name == n || (n!=null && n.equals(name)) {
+ result.add(getVal(i));
+ }
{code}
was (Author: yseeley@gmail.com):
Micro-optimization: since names will often be interned (constants), you could replace this code
+ if (name == null) {
+ if (n == null) {
+ result.add(getVal(i));
+ }
+ } else if (name.equals(n)) {
+ result.add(getVal(i));
+ }
with something like this:
+ if (name == n || (n!=null && n.equals(name)) {
+ result.add(getVal(i));
+ }
> Add a getAll method to NamedList
> --------------------------------
>
> Key: SOLR-621
> URL: https://issues.apache.org/jira/browse/SOLR-621
> Project: Solr
> Issue Type: Improvement
> Reporter: Noble Paul
> Priority: Trivial
> Attachments: SOLR-621.patch
>
>
> It would be convenient to have a
> List<T> getAll(String name);
> method in NamedList
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.