[
https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913787#comment-17913787
]
David Smiley commented on SOLR-17623:
-------------------------------------
Perhaps the Map methods that modify can be UnsupportedOperationException, thus
the Map is a read-only view. This side-steps concerns of {{put(key, value)}}
being O(N). The real intention in this issue is a read-view; don't need a
write-view.
> SimpleOrderedMap should implement Map
> -------------------------------------
>
> Key: SOLR-17623
> URL: https://issues.apache.org/jira/browse/SOLR-17623
> Project: Solr
> Issue Type: Improvement
> Reporter: David Smiley
> Priority: Major
> Labels: newdev
>
> SimpleOrderedMap is semantically a Map; it should implement Map.
> Why: This will help us transition away from NamedList (it's superclass) in a
> number of places, since many (most?) places that are defined to return a
> NamedList could actually be declared to be a SimpleOrderedMap and eventually
> simply Map.
> There's some risk that code somewhere gets this Map, a large one, and then
> assumes it has better than O(N) lookup, which it doesn't provide. Perhaps a
> Javadoc warning will do.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]