You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/09/15 14:14:58 UTC

[GitHub] [curator] tisonkun commented on a diff in pull request #481: CURATOR-521. Polish code of handling closeMode in LeaderLatch#close

tisonkun commented on code in PR #481:
URL: https://github.com/apache/curator/pull/481#discussion_r1327348419


##########
curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java:
##########
@@ -200,8 +200,6 @@ private synchronized void internalClose(CloseMode closeMode, boolean failOnClose
             }
         }
 
-        Preconditions.checkNotNull(closeMode, "closeMode cannot be null");

Review Comment:
   Ensure nonnulll and even we can fallback to the default behavior anyway.



##########
curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java:
##########
@@ -200,8 +200,6 @@ private synchronized void internalClose(CloseMode closeMode, boolean failOnClose
             }
         }
 
-        Preconditions.checkNotNull(closeMode, "closeMode cannot be null");

Review Comment:
   Ensure nonnull and even we can fallback to the default behavior anyway.



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

To unsubscribe, e-mail: commits-unsubscribe@curator.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org