From 673c112ca0be2820200230a518ad35f9efb57c22 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Wed, 8 May 2024 17:22:22 -0700 Subject: [PATCH] HDDS-10834. Revert snapshot diff output change added in HDDS-9360 (#6660) --- .../ozone/snapshot/SnapshotDiffReportOzone.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java index 3d14e266daa..29bf4deb2a0 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffReportOzone.java @@ -101,16 +101,12 @@ public String toString() { .append(" and snapshot: ") .append(getLaterSnapshotName()) .append(LINE_SEPARATOR); - if (!getDiffList().isEmpty()) { - for (DiffReportEntry entry : getDiffList()) { - str.append(entry.toString()).append(LINE_SEPARATOR); - } - if (StringUtils.isNotEmpty(token)) { - str.append("Next token: ") - .append(token); - } - } else { - str.append("No diff or no more diff for the request parameters."); + for (DiffReportEntry entry : getDiffList()) { + str.append(entry.toString()).append(LINE_SEPARATOR); + } + if (StringUtils.isNotEmpty(token)) { + str.append("Next token: ") + .append(token); } return str.toString(); }