divijvaidya commented on code in PR #13096:
URL: https://github.com/apache/kafka/pull/13096#discussion_r1067074631
##########
core/src/main/scala/kafka/tools/JmxTool.scala:
##########
@@ -212,7 +212,7 @@ object JmxTool extends Logging {
// print csv header
val keys = List("time") ++ queryAttributes(mbsc, names,
attributesInclude).keys.toArray.sorted
- if(reportFormatOriginal && keys.size == numExpectedAttributes.values.sum +
1) {
+ if(reportFormatOriginal &&
(keys.sizeCompare(numExpectedAttributes.values.sum + 1) == 0)) {
Review Comment:
FYI reviewers -
keys is a scala Iterable, hence, sizeCompare() is beneficial.
--
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]