[ https://issues.apache.org/jira/browse/SOLR-17623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17922921#comment-17922921 ]
Renato Haeberli commented on SOLR-17623: ---------------------------------------- You're welcome, I couldn't have done it without your help! Just to make sure, I do understand the challenges around moving away from NamedList.asShallowMap correctly: NamedList.asShallowMap calls NamedList.this.asMap(1), hence NamedLists within a NamedList are also converted to a Map. By simply using SOM wherever asShallowMap is called, we would 'lose' this conversion of the nested NamedList. Could we overcome that issue by ensuring, that wherever asShallowMap is called, we change the code so that the SOM only holds other SOMs, and no NamedList? With that, the nested data structure is already a Map by definition and should not cause any issues. Is the goal to also to move away from NamedList.asMap or only from asShallowMap? > 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, pull-request-available > Fix For: 9.9 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > 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: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org