Aias00 commented on PR #10691:
URL: https://github.com/apache/rocketmq/pull/10691#issuecomment-5138129470

   Addressed the malformed-port range feedback in commit `8ca55cbf4`.
   
   Changes:
   - Validate parsed `SimpleChannel` ports explicitly as `0..65535` before 
constructing `InetSocketAddress`.
   - Keep malformed values returning `null` instead of allowing 
`IllegalArgumentException` to propagate.
   
   Regression coverage added for both `remoteAddress()` and `localAddress()`:
   - non-numeric port
   - `-1`
   - `65536`
   - overflow value larger than `Integer.MAX_VALUE`
   - empty port
   - whitespace port
   
   Caller coverage added for:
   - `ChannelManager` consuming invalid remote/local addresses safely
   - `LocalProxyRelayService` completing the async relay callback and passing a 
`SimpleChannelHandlerContext` whose channel returns `null` remote/local 
addresses safely
   
   Local verification with JDK 8:
   `JAVA_HOME=$(/usr/libexec/java_home -v 1.8) mvn -pl proxy 
-Dtest=SimpleChannelTest,LocalProxyRelayServiceTest -DfailIfNoTests=false test`
   
   Result: `Tests run: 5, Failures: 0, Errors: 0, Skipped: 0`; checkstyle and 
spotbugs passed in the same run.


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