yuluo-yx opened a new issue, #10861: URL: https://github.com/apache/rocketmq/issues/10861
## Runtime platform environment macOS; reproduced through the `mqadmin cleanBrokerMetadata` command parser in the `tools` module. ## RocketMQ version Branch: `develop` Git commit: `fd0c95920e0deac96ce2ae27442747cc5e65e930` ## JDK Version Eclipse Temurin 17.0.19+10 ## Describe the Bug `CleanControllerBrokerMetaSubCommand` attempts to validate the semicolon-separated broker controller IDs with `Arrays.stream(...).map(Long::parseLong)`. Because the stream has no terminal operation, parsing is never executed and malformed IDs pass validation. ## Steps to Reproduce 1. Parse `mqadmin cleanBrokerMetadata -a 127.0.0.1:9878 -bn broker-a -c cluster-a -b 1;not-a-number`. 2. Execute the command. 3. Observe that local validation does not reject `not-a-number` and execution proceeds toward the admin request. ## What Did You Expect to See? The command should throw `IllegalArgumentException` for any non-numeric controller ID before starting a remote operation. ## What Did You See Instead? The lazy stream is never consumed, so the malformed ID is accepted locally. ## Additional Context A simple eager iteration preserves the existing input format and error message. -- 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]
