serhiy-bzhezytskyy opened a new pull request, #4761: URL: https://github.com/apache/solr/pull/4761
Removes `NamedList.get(String,int)`, `asShallowMap()`/`asShallowMap(boolean)`, and `SolrParams.toNamedList()` — 30 call sites, migrated to the documented `SimpleOrderedMap(MapWriter)` constructor / `indexOf`+`getVal`. Where to look: `asShallowMap()` was a hybrid, not a view — `get`/`put`/`remove` were live against the backing `NamedList`, but `entrySet()`/`keySet()`/`values()` returned a depth-1 copy that collapsed duplicate keys. The migration preserves the live-write sites (`QueryComponent`, `CombinedQueryComponent` — explicit `indexOf` then `add`-or-`setVal`) and changes duplicate-key handling only where nothing reachable actually has duplicates (`SolrXmlConfig`, `LTRThreadModule`). One place where the documented replacement would have been a bug: `SolrJacksonMapper`'s `NamedList` serializer used `asShallowMap()`; handing it a `SimpleOrderedMap` (which IS a `NamedList`) would recurse into itself. Uses `asMap(0)` instead. Left better than found: the deleted test covered only `asShallowMap`'s write-through; `SimpleOrderedMapTest` gains the copy-not-view invariant every migrated site now depends on, confirmed by a trap. Verified: full compile, ecjLint/renderJavadoc on solrj+core, 8 changed test classes — 71 tests, 0 failures. SOLR-18374, SOLR-18380, SOLR-18386 and SOLR-18389 touch files this PR also touches — merging this one first should make those cleaner to extract. AI-assisted (Claude Sonnet 5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
