[
https://issues.apache.org/jira/browse/SOLR-912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656390#action_12656390
]
Kay Kay commented on SOLR-912:
------------------------------
The interface is present only to enable the migration from NamedList (legacy)
to the new one. (with similar properties of Cloneable, Serializable etc. ).
If type-safety is not a concern - is there a reason why NamedList<T> is defined
as a generic type. We could probably define it as NamedList , with T replaced
to be an object internally. not making it a generic type.
There seems to be no memory leaks as far as the container is concerned.
Creating an iterator object for every call to an iterator seems to be quite a
bit of data redundancy issues when ideally we can use the iterator of one of
the underlying objects as well.
> org.apache.solr.common.util.NamedList - Typesafe efficient variant -
> ModernNamedList introduced - implementing the same API as NamedList
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-912
> URL: https://issues.apache.org/jira/browse/SOLR-912
> Project: Solr
> Issue Type: Improvement
> Components: clients - java
> Affects Versions: 1.4
> Environment: Tomcat 6, JRE 6, Solr 1.3+ nightlies
> Reporter: Kay Kay
> Priority: Minor
> Fix For: 1.3.1
>
> Attachments: SOLR-912.patch
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> The implementation of NamedList - while being fast - is not necessarily
> type-safe. I have implemented an additional implementation of the same -
> ModernNamedList (a type-safe variation providing the same interface as
> NamedList) - while preserving the semantics in terms of ordering of elements
> and allowing null elements for key and values (keys are always Strings ,
> while values correspond to generics ).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.