bboyleonp666 commented on PR #16843: URL: https://github.com/apache/kafka/pull/16843#issuecomment-2335093204
> @bboyleonp666 please rebase code to fix build error. Also, please fix following usages: > > https://github.com/apache/kafka/blob/28cd7136fb1b5702af82c3736d246c7a1e709140/core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala#L72 Since `zookeeper.getZKDatabase` is not a `Closeable`, we are not able to use `Utils.closeQuietly()` to replace it. I will keep it as it is. > > https://github.com/apache/kafka/blob/28cd7136fb1b5702af82c3736d246c7a1e709140/core/src/main/scala/kafka/server/ZkAdminManager.scala#L550 > > https://github.com/apache/kafka/blob/28cd7136fb1b5702af82c3736d246c7a1e709140/core/src/main/scala/kafka/server/ZkAdminManager.scala#L551 The lines here use `foreach` to close the resources, while `CoreUtils.swallow()` is not limited to an object type like `Utils.closeQuietly()` does. I wonder whether we should keep using `foreach` to keep the code concise and consistent or should we make it a for loop to achieve the same effect? What's your opinion? -- 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