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

   ### Which Issue(s) This PR Fixes
   
   Fixes #10690
   
   ### Brief Description
   
   `SimpleChannel.parseSocketAddress` already returns `null` for blank 
addresses and strings that do not match `host:port`, but it directly parsed the 
port when two segments were present. A malformed value such as 
`127.0.0.1:not-a-port` could make `remoteAddress()` or `localAddress()` throw 
`NumberFormatException`.
   
   This PR makes malformed port values follow the same invalid-address behavior 
by returning `null`, with a diagnostic warning. Valid addresses keep the 
existing behavior.
   
   ### How Did You Test This Change?
   
   ```bash
   mvn -pl proxy -Dtest=SimpleChannelTest -DfailIfNoTests=false test
   ```
   
   Result: `BUILD SUCCESS`, `Tests run: 2, Failures: 0, Errors: 0, Skipped: 0`.
   


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