nizhikov commented on code in PR #14610:
URL: https://github.com/apache/kafka/pull/14610#discussion_r1368080679


##########
core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala:
##########
@@ -110,13 +110,16 @@ object ConsumerGroupCommand extends Logging {
   }
 
   def printOffsetsToReset(groupAssignmentsToReset: Map[String, 
Map[TopicPartition, OffsetAndMetadata]]): Unit = {
-    if (groupAssignmentsToReset.nonEmpty)
-      println("\n%-30s %-30s %-10s %-15s".format("GROUP", "TOPIC", 
"PARTITION", "NEW-OFFSET"))
+    val format = "%-30s %-30s %-10s %-15s"
+    if (groupAssignmentsToReset.nonEmpty) {
+      println()

Review Comment:
   Seems like explicit `println` makes it easier to understand what will be 
printer.
   But, of course, we can go with more compact 
   `println("\n" + format.format("GROUP", "TOPIC", "PARTITION", "NEW-OFFSET"))`



##########
core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala:
##########
@@ -110,13 +110,16 @@ object ConsumerGroupCommand extends Logging {
   }
 
   def printOffsetsToReset(groupAssignmentsToReset: Map[String, 
Map[TopicPartition, OffsetAndMetadata]]): Unit = {
-    if (groupAssignmentsToReset.nonEmpty)
-      println("\n%-30s %-30s %-10s %-15s".format("GROUP", "TOPIC", 
"PARTITION", "NEW-OFFSET"))
+    val format = "%-30s %-30s %-10s %-15s"
+    if (groupAssignmentsToReset.nonEmpty) {
+      println()

Review Comment:
   Seems like explicit `println` makes it easier to understand what will be 
printed.
   But, of course, we can go with more compact 
   `println("\n" + format.format("GROUP", "TOPIC", "PARTITION", "NEW-OFFSET"))`



-- 
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