Russole opened a new pull request, #23436: URL: https://github.com/apache/kafka/pull/23436
This PR removes the redundant string parsing from `MessageUtil.jsonNodeToInt` and `jsonNodeToLong`. `JsonConverterGenerator` already selects the appropriate conversion method based on the field type, and textual nodes are rejected before the parsing logic is reached. The methods now validate integral values and their target ranges directly before returning `intValue()` or `longValue()`. Tests are added for supported integral nodes, out-of-range values, and invalid node types. ### Testing `./gradlew clients:test --tests org.apache.kafka.common.protocol.MessageUtilTest` -- 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]
