From 6323754621826fee50b8912f9feae0c46a91766b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9C=E9=98=B3?= Date: Sun, 7 Mar 2021 13:02:53 +0800 Subject: [PATCH] [ISSUE #2698] TopicRouteSubCommand enhancement --- .../rocketmq/tools/command/topic/TopicRouteSubCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicRouteSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicRouteSubCommand.java index 2b5e75b8..1b6979b8 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicRouteSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicRouteSubCommand.java @@ -34,7 +34,7 @@ import java.util.Map; public class TopicRouteSubCommand implements SubCommand { - private static final String FORMAT = "%-45s %-32s %-50s %-10s %-11s %-5s\n"; + private static final String FORMAT = "%-45s %-32s %-50s %-10s %-11s %-5s%n"; @Override public String commandName() { @@ -80,7 +80,7 @@ public class TopicRouteSubCommand implements SubCommand { private void printData(TopicRouteData topicRouteData, boolean useListFormat) { if (!useListFormat) { - System.out.printf("%s\n", topicRouteData.toJson(true)); + System.out.printf("%s%n", topicRouteData.toJson(true)); return; } @@ -109,7 +109,7 @@ public class TopicRouteSubCommand implements SubCommand { for (int i = 0; i < 158; i++) { System.out.print("-"); } - System.out.print("\n"); + System.out.print("%n"); System.out.printf(FORMAT, "Total:", map.keySet().size(), "", totalReadQueue, totalWriteQueue, ""); } } \ No newline at end of file -- GitLab