jacob-netguardians commented on code in PR #2977: URL: https://github.com/apache/helix/pull/2977#discussion_r1879423874
########## 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: Done. reverted global reformatting and only applied it on the lines I had changed initially. -- 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