jacob-netguardians commented on code in PR #2977:
URL: https://github.com/apache/helix/pull/2977#discussion_r1876131385


##########
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java:
##########
@@ -235,7 +235,9 @@ public static GenericHelixController 
getLeaderController(String clusterName) {
     if (clusterName != null) {
       ImmutableSet<GenericHelixController> controllers = 
_helixControllerFactory.get(clusterName);
       if (controllers != null) {
-        return controllers.stream().filter(controller -> 
controller._helixManager.isLeader())
+        return controllers.stream()
+            .filter(controller -> controller._helixManager != null)
+            .filter(controller -> controller._helixManager.isLeader())
             .findAny().orElse(null);

Review Comment:
   Ok, I now understood what you meant. I applied the format to all the files I 
touched. I don't necessarily find it more readable, but then I guess this is 
also a question of taste. Hopefully this is ok now.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to