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 2020/01/06 18:27:01 UTC

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

belugabehr 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_r363419446
 
 

 ##########
 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) {
 
 Review comment:
   I'm not sure on the history there... maybe someone at some time was passing a null here.  Like I said, that is no longer the case and I am enforcing it in the constructor.

----------------------------------------------------------------
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