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 Kay Kay <ka...@gmail.com> on 2008/12/14 06:06:59 UTC

Type safety regarding org.apache.solr.common.util.NamedList - Solr-912

Hi -
   I went through the implementation of NamedList<T> in 
org.apache.solr.common.util.*.

While I can understand that from an implementation reasons behind 
preserving the order while looking up by index and key as well - I had 
changed the implementation a little bit - in terms of using Map.Entry as 
individual elements and not as { String , T } in a heterogenous List as 
before.

The resulting code is more type-safe without sacrificing the properties 
as required by NamedList.

I have created a jira request here at - 
https://issues.apache.org/jira/browse/SOLR-912 , and submitted the patch 
containing the revised file - along with unit test cases and a new 
common interface ( INamedList<T> ) for ease of decoupling in the future.

Let me know your comments regarding the same.