ahuang98 commented on code in PR #12072: URL: https://github.com/apache/kafka/pull/12072#discussion_r861634032
########## clients/src/main/java/org/apache/kafka/common/requests/ApiVersionsResponse.java: ########## @@ -271,4 +273,48 @@ public static ApiVersion toApiVersion(ApiKeys apiKey) { .setMinVersion(apiKey.oldestVersion()) .setMaxVersion(apiKey.latestVersion()); } + + public static ApiVersionsResponse apiVersionsResponse( Review Comment: There's one non-test use case [here](https://github.com/ahuang98/kafka/blob/0cb2a9230476654b60dd54ef0147bae0cf0404ea/core/src/main/scala/kafka/server/ApiVersionManager.scala#L84-L98) in `ApiVersionManager.apiVersionResponse` which is called by SocketServer, ControllerApis, KafkaApis. I guess even if it isn't safe to assume finalized features will be set, I can refactor the `ApiVersionManager.apiVersionResponse` to throw an exception instead of using the match statement? -- 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