Skip to content

Commit 9f58198

Browse files
authored
[ISSUE #9883] Remove unnecessary MessageFormat.format (#9884)
* [ISSUE #9883] Remove unnecessary MessageFormat.format * Update import
1 parent bca6393 commit 9f58198

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
import org.apache.rocketmq.tools.command.CommandUtil;
105105

106106
import java.io.UnsupportedEncodingException;
107-
import java.text.MessageFormat;
108107
import java.util.ArrayList;
109108
import java.util.Arrays;
110109
import java.util.Collections;
@@ -905,19 +904,19 @@ public void run() {
905904
resetOffsetByTimestampOld(addr, topicRouteMap.get(bd.getBrokerName()), group, topic, timestamp, true);
906905
successList.add(addr);
907906
} catch (Exception e2) {
908-
logger.error(MessageFormat.format("resetOffsetByTimestampOld error. addr={0}, topic={1}, group={2},timestamp={3}", addr, topic, group, timestamp), e);
907+
logger.error("resetOffsetByTimestampOld error. addr={}, topic={}, group={}, timestamp={}", addr, topic, group, timestamp, e);
909908
failureList.add(addr);
910909
}
911910
} else if (ResponseCode.SYSTEM_ERROR == e.getResponseCode()) {
912911
// CODE: 1 DESC: THe consumer group <GID_newggghh> not exist, never online
913912
successList.add(addr);
914913
} else {
915914
failureList.add(addr);
916-
logger.error(MessageFormat.format("resetOffsetNewConcurrent error. addr={0}, topic={1}, group={2},timestamp={3}", addr, topic, group, timestamp), e);
915+
logger.error("resetOffsetNewConcurrent error. addr={}, topic={}, group={}, timestamp={}", addr, topic, group, timestamp, e);
917916
}
918917
} catch (Exception e) {
919918
failureList.add(addr);
920-
logger.error(MessageFormat.format("resetOffsetNewConcurrent error. addr={0}, topic={1}, group={2},timestamp={3}", addr, topic, group, timestamp), e);
919+
logger.error("resetOffsetNewConcurrent error. addr={}, topic={}, group={}, timestamp={}", addr, topic, group, timestamp, e);
921920
} finally {
922921
latch.countDown();
923922
}

0 commit comments

Comments
 (0)