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


##########
curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderLatch.java:
##########
@@ -213,18 +211,12 @@ private synchronized void internalClose(CloseMode 
closeMode, boolean failOnClose
         } finally {
             client.getConnectionStateListenable().removeListener(listener);
 
-            switch (closeMode) {
-                case NOTIFY_LEADER: {
-                    setLeadership(false);
-                    listeners.clear();
-                    break;
-                }
-
-                default: {
-                    listeners.clear();
-                    setLeadership(false);
-                    break;
-                }
+            if (closeMode == CloseMode.NOTIFY_LEADER) {

Review Comment:
   It is just a matter of style. Ignore if you have some preferences.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to