[ISSUE #10589] Rename DecodeMessageIdCommond to DecodeMessageIdCommand#10590
[ISSUE #10589] Rename DecodeMessageIdCommond to DecodeMessageIdCommand#10590yx9o wants to merge 2 commits into
Conversation
yx9o
commented
Jul 3, 2026
- Fixes [Enhancement] Rename misspelled DecodeMessageIdCommond class #10589.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #10590 +/- ##
=============================================
- Coverage 48.26% 48.16% -0.10%
+ Complexity 13433 13406 -27
=============================================
Files 1378 1378
Lines 100817 100817
Branches 13040 13041 +1
=============================================
- Hits 48660 48563 -97
- Misses 46211 46290 +79
- Partials 5946 5964 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RongtongJin
left a comment
There was a problem hiding this comment.
I left one inline comment about the unused command.
| import org.apache.rocketmq.tools.command.SubCommandException; | ||
|
|
||
| public class DecodeMessageIdCommond implements SubCommand { | ||
| public class DecodeMessageIdCommand implements SubCommand { |
There was a problem hiding this comment.
This command does not seem to be registered or referenced anywhere. Would it be better to remove it instead of renaming it?
There was a problem hiding this comment.
Good point. Since this command has a clear purpose but is currently not registered, I prefer keeping it and registering it in MQAdminStartup instead of removing it.
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Fixes a typo in the class name (DecodeMessageIdCommond → DecodeMessageIdCommand), registers the command in MQAdminStartup, and makes the -i option required (since decoding without a message ID is meaningless).
Findings
-
[Info]
MQAdminStartup.java:265— The old classDecodeMessageIdCommondwas never registered ininitCommand(), so this effectively adds a new usable command rather than renaming an existing one. No backward-compatibility concern. -
[Info]
DecodeMessageIdCommand.java:30— ChangingcommandName()from"DecodeMessageId"to"decodeMessageId"follows the camelCase convention used by other subcommands. Good. -
[Info]
DecodeMessageIdCommand.java:41— Making-irequired (setRequired(true)) is correct — the command cannot function without a message ID.
Verdict
Clean, small fix. Typo correction + proper command registration. LGTM.
Automated review by github-manager-bot
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review by github-manager-bot (re-review)
Update since last review
New commit 4fe02bc (2026-07-08) addresses @RongtongJin's feedback by registering DecodeMessageIdCommand in MQAdminStartup.initCommand(). The command is now properly wired into the CLI tool.
Changes in this commit
- MQAdminStartup.java: Added import and
initCommand(new DecodeMessageIdCommand())— resolves the "unused command" concern - commandName(): Changed from
"DecodeMessageId"to"decodeMessageId"— follows camelCase convention consistent with other subcommands - commandDesc(): Capitalized first letter, added period — minor style improvement
-ioption: Changed fromsetRequired(false)tosetRequired(true)— prevents NPE when no message ID is provided- Output format: Changed from
ip=%s/date=%stoIP: %s%n/Date: %s%n— more readable with proper newlines - Error handling: Consolidated two separate try-catch blocks into one, replaced silent
e.printStackTrace()withSubCommandException— proper error propagation
Findings
-
[Warning]
DecodeMessageIdCommand.java:31—commandName()changed from"DecodeMessageId"to"decodeMessageId". This is a breaking change for users who have scripts or automation relying on the old command name (e.g.,mqadmin DecodeMessageId -i xxx). Consider keeping backward compatibility by supporting both names, or at minimum document this in the PR description / release notes. -
[Info]
DecodeMessageIdCommand.java:37— Making-irequired is the right call. The old code would NPE oncommandLine.getOptionValue('i').trim()if the option was omitted. Good fix. -
[Info]
DecodeMessageIdCommand.java:50-53— Output format change (IP: ... / Date: ...) is more readable. Note that scripts parsing the oldip=.../date=...format will need updating.
Verdict
The new commit properly addresses the reviewer feedback. The code changes are clean and improve error handling. The main concern is the CLI command name change — flagging it as a potential compatibility issue for downstream users.
Automated review by github-manager-bot