diff --git a/kafka-rest/src/main/java/io/confluent/kafkarest/ClusterInformationObserver.java b/kafka-rest/src/main/java/io/confluent/kafkarest/ClusterInformationObserver.java index a7b30dfd60..0bbd0cc480 100644 --- a/kafka-rest/src/main/java/io/confluent/kafkarest/ClusterInformationObserver.java +++ b/kafka-rest/src/main/java/io/confluent/kafkarest/ClusterInformationObserver.java @@ -32,7 +32,7 @@ */ public class ClusterInformationObserver { - private ZkUtils zkUtils; + private final ZkUtils zkUtils; public ClusterInformationObserver(ZkUtils zkUtils) { this.zkUtils = zkUtils; @@ -52,7 +52,7 @@ public BrokerEntity getCurrentClusterController() { } return new BrokerEntity(brokerInfo.id(), result); } else { - return null; + return BrokerEntity.empty(); } }