RockteMQ-AI commented on issue #11410:
URL: https://github.com/apache/rocketmq/issues/11410#issuecomment-6143124495

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase. Three 
distinct option-declaration mismatches exist in the `tools` module:
   
   1. **`ConsumerSubCommand`**: `-i` is read via `hasOption('i')` / 
`getOptionValue('i')` but never registered in `buildCommandlineOptions`. The 
per-client query branch is unreachable dead code; `DefaultParser` rejects the 
flag before `execute()` runs.
   2. **`ResetMasterFlushOffsetSubCommand`**: `-b` and `-o` are declared 
`setRequired(false)` but read unconditionally with `.trim()` and 
`Long.parseLong()`. Omitting either option causes `NullPointerException`.
   3. **`DecodeMessageIdSubCommand`**: `-i` is declared `setRequired(false)` 
but read unconditionally. Omitting the option causes `NullPointerException`.
   
   **Root Cause:** Option declaration in `buildCommandlineOptions` does not 
match the keys consumed in `execute()`. No null-checks guard the reads.
   **Impact:** `mqadmin` CLI — three subcommands crash or reject valid input.
   **Severity:** medium (CLI usability; no data-path impact)
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to