dimitarndimitrov commented on code in PR #13856: URL: https://github.com/apache/kafka/pull/13856#discussion_r1233955360
########## core/src/main/scala/kafka/server/BrokerToControllerChannelManager.scala: ########## @@ -366,16 +367,16 @@ class BrokerToControllerRequestThread( val controllerAddress = activeControllerAddress() if (controllerAddress.isDefined) { requestIter.remove() - return Some(RequestAndCompletionHandler( + return util.Collections.singletonList(new RequestAndCompletionHandler( time.milliseconds(), controllerAddress.get, request.request, - handleResponse(request) + response => handleResponse(request)(response) )) } } } - None + util.Collections.emptyList() Review Comment: I had the exact same thought - getting rid of the `util` prefixes in the various places in Scala classes where Java collection types are now used. Unfortunately IntelliJ flagged the `Collection` return type of `generateRequests()` with a `Reference must be prefixed` warning, so as I didn't find a nice way to avoid the prefix there, I decided it's preferable to just keep the prefixes for all the related usages of Java collection types. -- 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