Loyal-Young opened a new pull request, #10648: URL: https://github.com/apache/rocketmq/pull/10648
## Summary - make `validateInstanceEndpoint` return `false` for a null endpoint - return `null` when `parseInstanceIdFromEndpoint` receives an invalid non-empty endpoint - cover null and normal NameServer endpoints with unit tests ## Why The parser previously used string indexes on any non-empty input. A normal NameServer address that is not an instance endpoint could therefore throw `StringIndexOutOfBoundsException`. ## Impact Valid instance endpoints retain their existing parsed instance ID. Invalid or non-instance endpoints now fail safely with `null`. ## Validation - `git diff --check` - Not run: Maven and a JDK are unavailable in the local environment; the draft PR should be validated by upstream CI. -- 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]
