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