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

   When writing a `ByteBuffer` backed by a `HeapBuffer` to a 
`DataOutputStream`, it is necessary to pass in the offset, not the position. 
The current code results in writing the wrong data to `DataOutputStream`. While 
the `DataOutputStreamWritable` is used in the project, I do not see any 
references that would utilize this code path, so this bug fix is relatively 
minor.
   
   I added a new test to cover the exact bug. The test fails without this 
change.
   
   Additionally, it's relevant to note that there are other locations in the 
code base with the correct usage of `arrayOffset()`. I don't see any similar 
bugs based on some quick searches through the code base.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to