YALI58 opened a new pull request, #10869:
URL: https://github.com/apache/rocketmq/pull/10869

   ### Bug Description
   
   `cleanBrokerMetadata` command uses `Arrays.stream(...).map(Long::parseLong)` 
to validate broker controller IDs. Since `map()` is a lazy intermediate 
operation without a terminal operation, `Long.parseLong()` is never executed, 
allowing malformed IDs like `not-a-number` to pass validation.
   
   ### Fix
   
   Changed `map()` to `forEach()` so the stream is actually consumed and 
`Long.parseLong()` is evaluated for each ID.
   
   ### Testing
   
   Added `CleanControllerBrokerMetaSubCommandTest` with a test case that 
verifies malformed input throws `IllegalArgumentException`.
   
   Closes #10861


-- 
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