Skip to content

Conversation

brittytino
Copy link

Description

This PR fixes the decodeContexts method in the FailoverListener class to properly use the ByteBuffer slice. Previously, the slice was created but not used, which could lead to incorrect reading of bytes and potential decoding errors.

The fix assigns the sliced buffer to a variable and reads from it, ensuring correct handling of the ByteBuffer without modifying the original buffer's position.

Changes

  • Assigned byteBuffer.slice() to a local variable before reading data
  • Used the slice for reading the JSON byte array

Why

This correction ensures the failover context decoding is reliable and respects ByteBuffer semantics, preventing subtle bugs in failover context processing.

No other functionality or features were changed.

@CLAassistant
Copy link

CLAassistant commented Oct 7, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants