mumrah commented on code in PR #12050:
URL: https://github.com/apache/kafka/pull/12050#discussion_r874905164


##########
clients/src/main/java/org/apache/kafka/clients/NodeApiVersions.java:
##########
@@ -91,19 +95,11 @@ public static NodeApiVersions create(short apiKey, short 
minVersion, short maxVe
                 .setMaxVersion(maxVersion)));
     }
 
-    public NodeApiVersions(ApiVersionCollection nodeApiVersions) {
-        for (ApiVersion nodeApiVersion : nodeApiVersions) {
-            if (ApiKeys.hasId(nodeApiVersion.apiKey())) {
-                ApiKeys nodeApiKey = ApiKeys.forId(nodeApiVersion.apiKey());
-                supportedVersions.put(nodeApiKey, nodeApiVersion);
-            } else {
-                // Newer brokers may support ApiKeys we don't know about
-                unknownApis.add(nodeApiVersion);
-            }
-        }
+    public NodeApiVersions(Collection<ApiVersion> nodeApiVersions) {

Review Comment:
   I think the constructors and factory methods on this class could use some 
cleanup, but it touches a lot of files so I was hoping to do this as a 
follow-up. For now, I'll remove the new constructor that was added



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to