sigram commented on code in PR #5403:
URL: https://github.com/apache/solr/pull/5403#discussion_r4754232646


##########
solr/core/src/java/org/apache/solr/util/DataConfigNode.java:
##########
@@ -135,11 +139,8 @@ public List<ConfigNode> getAll(Set<String> names, 
Predicate<ConfigNode> test) {
 
   @Override
   public void forEachChild(Function<ConfigNode, Boolean> fun) {
-    kids.forEach(
-        (s, configNodes) -> {
-          if (configNodes != null) {
-            configNodes.forEach(fun::apply);
-          }
-        });
+    // the callback's return value is ignored: ConfigNode.get(name) relies on 
child(name, null)
+    // returning the last matching element, e.g. an explicit section after an 
XInclude'd one
+    children.forEach(fun::apply);

Review Comment:
   `DataConfigNode` already kept its children in `Map.copyOf` with 
non-deterministic iteration so this behavior couldn't be relied upon anyway to 
preserve args positions.



-- 
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]

Reply via email to