nileshkumar3 opened a new pull request, #22495: URL: https://github.com/apache/kafka/pull/22495
## Summary Fixes [KAFKA-20657](https://issues.apache.org/jira/browse/KAFKA-20657). Kafka Connect `BYTES` values may be represented as either `byte[]` or `ByteBuffer`. `JsonConverter` serialized `ByteBuffer` values using `.array()`, which: - Ignores `position()` / `limit()` and serializes the full backing array for sliced heap buffers (wrong payload) - Throws `UnsupportedOperationException` for direct buffers (no backing array) Use `Utils.toArray(ByteBuffer)` instead, matching `Values.convertToBytes()` and reading the buffer's logical remaining bytes for both heap-backed and direct buffers. -- 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]
