Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
public void addWatch(String basePath, Watcher watcher, AddWatchMode mode) throws KeeperException, InterruptedException { PathUtils.validatePath(basePath); String serverPath = prependChroot(basePath); RequestHeader h = new RequestHeader(); h.setType(ZooDefs.OpCode.addWatch); AddWatchRequest request = new AddWatchRequest(serverPath, mode.getMode()); ReplyHeader r = cnxn.submitRequest(h, request, new ErrorResponse(),
we need to validateWatcher(watcher) to ** avoid the case:
zk.addWatch("/a/b", null, PERSISTENT_RECURSIVE);