You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Mohammad Arshad (Jira)" <ji...@apache.org> on 2021/04/04 05:25:00 UTC
[jira] [Updated] (ZOOKEEPER-3992) addWatch api should check the
null watch
[ https://issues.apache.org/jira/browse/ZOOKEEPER-3992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mohammad Arshad updated ZOOKEEPER-3992:
---------------------------------------
Fix Version/s: 3.8.0
3.6.3
> addWatch api should check the null watch
> ----------------------------------------
>
> Key: ZOOKEEPER-3992
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3992
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client
> Reporter: Ling Mao
> Assignee: Damien Diederen
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.6.3, 3.7.0, 3.8.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> {code:java}
> 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(),
>
> {code}
> we need to _*validateWatcher(watcher)*_ to ** avoid the case:
> {code:java}
> zk.addWatch("/a/b", null, PERSISTENT_RECURSIVE);
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)