zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvfangmin <...@git.apache.org>
Subject [GitHub] zookeeper pull request #650: ZOOKEEPER-1908: setAcl should be have a recursi...
Date Sun, 30 Sep 2018 20:29:31 GMT
Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/650#discussion_r221472284
  
    --- Diff: src/java/main/org/apache/zookeeper/cli/SetAclCommand.java ---
    @@ -69,9 +72,22 @@ public boolean exec() throws CliException {
                 version = -1;
             }
             try {
    -            Stat stat = zk.setACL(path, acl, version);
    -            if (cl.hasOption("s")) {
    -                new StatPrinter(out).print(stat);
    +            if (cl.hasOption("R")) {
    +                ZKUtil.visitSubTreeDFS(zk, path, false, new StringCallback() {
    +                    @Override
    +                    public void processResult(int rc, String path, Object ctx, String
name) {
    --- End diff --
    
    It’s better to avoid overriding the path variable here. 


---

Mime
View raw message