jsancio commented on code in PR #12183:
URL: https://github.com/apache/kafka/pull/12183#discussion_r882941755


##########
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java:
##########
@@ -200,23 +201,24 @@ Builder setCreateTopicPolicy(Optional<CreateTopicPolicy> 
createTopicPolicy) {
         }
 
         ReplicationControlManager build() {
-            if (configurationControl == null) {
-                throw new RuntimeException("You must specify 
configurationControl.");
-            }
-            if (clusterControl == null) {
-                throw new RuntimeException("You must specify clusterControl.");
-            }
-            if (controllerMetrics == null) {
-                throw new RuntimeException("You must specify 
controllerMetrics.");
+            if (metadataVersion == null) {
+                throw new IllegalStateException("Metadata version must be set 
before building");

Review Comment:
   Sounds good to me.



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

Reply via email to