junkaixue commented on code in PR #2977: URL: https://github.com/apache/helix/pull/2977#discussion_r1878685774
########## 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: Please make sure you load the Helix intellij / eclipse auto code formatter. -- 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