Github user eribeiro commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/160#discussion_r98968169
  
    --- Diff: src/java/main/org/apache/zookeeper/server/DataTree.java ---
    @@ -1045,18 +1046,16 @@ private void getCounts(String path, Counts counts) {
             if (node == null) {
                 return;
             }
    -        Set<String> children = null;
    +        String[] children = null;
             int len = 0;
             synchronized (node) {
    -            children = node.getChildren();
    +            Set<String> childs = node.getChildren();
    --- End diff --
    
    @arshadmohammad FYI (only): I guess some tests broke 'cause toArray copies 
the contents of childs to children while node.getChildren() returns a internal 
reference (subject to underneath change) to children. So, it would need to be 
something like children = new HashSet<>(childs);


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to