You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Cheng (JIRA)" <ji...@apache.org> on 2014/11/21 09:37:33 UTC
[jira] [Created] (ZOOKEEPER-2086) Unnecessary error log when
defaultWatcher is not set for ZooKeeper client
Cheng created ZOOKEEPER-2086:
--------------------------------
Summary: Unnecessary error log when defaultWatcher is not set for ZooKeeper client
Key: ZOOKEEPER-2086
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2086
Project: ZooKeeper
Issue Type: Bug
Components: java client
Affects Versions: 3.4.6
Reporter: Cheng
Priority: Minor
In org.apache.zookeeper.ZooKeeper.ZKWatchManager#materialize(), even if the defaultWatcher is null, it is still be added into the Set and returned. This would cause a lot of annoying error log at org.apache.zookeeper.ClientCnxn.EventThread#processEvent as below:
2014-11-21 15:21:23,279 - ERROR - [main-EventThread:ClientCnxn$EventThread@524] - Error while calling watcher
java.lang.NullPointerException
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
It can be simply fixed by having a null check in ZKWatchManager.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)