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


##########
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:
   Sorry, not sure I understand what you mean with "helix format". Is the 
formatting of the lines somehow faulty? From what I see the ".filter(...)" 
lines are indented the same way as the ".findAny()" line was before, so I don't 
get what is wrong, sorry.



-- 
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: reviews-unsubscr...@helix.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to