|
@@ -1791,6 +1791,8 @@ public class ZooKeeper {
|
|
|
* a comma separated list of new membership (non-incremental reconfiguration)
|
|
|
* @param fromConfig
|
|
|
* version of the current configuration (optional - causes reconfiguration to throw an exception if configuration is no longer current)
|
|
|
+ * @param stat the stat of /zookeeper/config znode will be copied to this
|
|
|
+ * parameter if not null.
|
|
|
* @return new configuration
|
|
|
* @throws InterruptedException If the server transaction is interrupted.
|
|
|
* @throws KeeperException If the server signals an error with a non-zero error code.
|
|
@@ -1805,7 +1807,9 @@ public class ZooKeeper {
|
|
|
if (r.getErr() != 0) {
|
|
|
throw KeeperException.create(KeeperException.Code.get(r.getErr()), "");
|
|
|
}
|
|
|
- DataTree.copyStat(response.getStat(), stat);
|
|
|
+ if (stat != null) {
|
|
|
+ DataTree.copyStat(response.getStat(), stat);
|
|
|
+ }
|
|
|
return response.getData();
|
|
|
}
|
|
|
|
|
@@ -1940,7 +1944,8 @@ public class ZooKeeper {
|
|
|
* @param path
|
|
|
* the given path for the node
|
|
|
* @param stat
|
|
|
- * the stat of the node will be copied to this parameter.
|
|
|
+ * the stat of the node will be copied to this parameter if
|
|
|
+ * not null.
|
|
|
* @return the ACL array of the given node.
|
|
|
* @throws InterruptedException If the server transaction is interrupted.
|
|
|
* @throws KeeperException If the server signals an error with a non-zero error code.
|
|
@@ -1964,7 +1969,9 @@ public class ZooKeeper {
|
|
|
throw KeeperException.create(KeeperException.Code.get(r.getErr()),
|
|
|
clientPath);
|
|
|
}
|
|
|
- DataTree.copyStat(response.getStat(), stat);
|
|
|
+ if (stat != null) {
|
|
|
+ DataTree.copyStat(response.getStat(), stat);
|
|
|
+ }
|
|
|
return response.getAcl();
|
|
|
}
|
|
|
|