You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/12/24 10:26:08 UTC

[GitHub] [zookeeper] maoling commented on a change in pull request #1192: ZOOKEEPER-3662: Remove NPE Possibility in Follower Class

maoling commented on a change in pull request #1192: ZOOKEEPER-3662: Remove NPE Possibility in Follower Class
URL: https://github.com/apache/zookeeper/pull/1192#discussion_r361129908
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Follower.java
 ##########
 @@ -248,14 +249,9 @@ protected void processPacket(QuorumPacket qp) throws Exception {
      * @return zxid
      */
     public long getZxid() {
-        try {
-            synchronized (fzk) {
-                return fzk.getZxid();
-            }
-        } catch (NullPointerException e) {
-            LOG.warn("error getting zxid", e);
+        synchronized (fzk) {
 
 Review comment:
   this NPE will never happens?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services