lh0156 opened a new pull request, #23071:
URL: https://github.com/apache/kafka/pull/23071

   ## Summary
   
   Use the ByteBuffer's remaining bytes when serializing Connect BYTES values 
to JSON.
   
   The previous implementation used ByteBuffer.array(), which serialized an 
entire backing array for sliced buffers and threw UnsupportedOperationException 
for direct buffers. Utils.toArray(ByteBuffer) preserves the logical 
position-to-limit range and supports both buffer types without changing the 
public API or wire format.
   
   Fixes KAFKA-20657
   
   ## Tests
   
   - TDD RED: the new sliced and direct ByteBuffer tests failed against the 
previous implementation.
   - TDD GREEN: both tests pass after the implementation change.
   - ./gradlew :connect:json:test --no-build-cache --console=plain
   - ./gradlew :connect:json:spotlessCheck :connect:json:checkstyleMain 
:connect:json:checkstyleTest :connect:json:spotbugsMain --no-build-cache 
--console=plain
   - git diff --check


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