[
https://issues.apache.org/jira/browse/ZOOKEEPER-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mate Szalay-Beko resolved ZOOKEEPER-3579.
-----------------------------------------
Fix Version/s: 3.7.0
Resolution: Fixed
Issue resolved by pull request 1120
[https://github.com/apache/zookeeper/pull/1120]
> handle NPE gracefully when the watch parameter of zookeeper java client is
> null
> -------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-3579
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3579
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client
> Reporter: maoling
> Assignee: Zili Chen
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.7.0
>
> Time Spent: 5h 40m
> Remaining Estimate: 0h
>
> When we use the native java client
> {code:java}
> try {
> zk = new ZooKeeper(connectString, (int) sessionTimeout, null);
> } catch (IOException e) {
> throw new DBException("Creating connection failed.");
> }
> {code}
> We will get the following, this issue had existed in all the zookeeper
> releases for a long time
> {code:java}
> 2019-10-14 18:41:49 ERROR ClientCnxn:537 - Error while calling
> watcher2019-10-14 18:41:49 ERROR ClientCnxn:537 - Error while calling
> watcherjava.lang.NullPointerException at
> org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:535)
> at
> org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:510)2019-10-14
> 18:41:50 ERROR ClientCnxn:537 - Error while calling
> watcherjava.lang.NullPointerException at
> org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:535)
> at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:510)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)