nick-boss-tech commented on code in PR #5015:
URL: https://github.com/apache/solr/pull/5015#discussion_r4179900258
##########
solr/core/src/java/org/apache/solr/core/PluginInfo.java:
##########
@@ -208,16 +208,19 @@ public void writeMap(EntryWriter ew) throws IOException {
Map<String, Object> childrenGrouped = new LinkedHashMap<>();
for (PluginInfo child : children) {
- Object old = childrenGrouped.get(child.name);
+ // Group by type (not name): children are looked up by type via
getChildren(type),
+ // and unrelated plugin types may share a name (e.g. formatter/encoder
both named "html").
Review Comment:
🤖 *AI text below* 🤖 *(posted on behalf of Nick Shanin)*
Thanks, trimmed it down: the grouping is now a single computeIfAbsent
accumulation into a Map<String, List<PluginInfo>>, and the comment is cut to
the two lines explaining why the key is the type rather than the name. Behavior
and output shape are unchanged (a type with one child still writes the child
itself, several write a list), and PluginInfoTest (11/11) and
TestConfigHighlightOutput (1/1) pass as before. Pushed in 51075ab7328.
--
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]