Skip to content

Conversation

@Shally-Katariya
Copy link

Motivation

The Deserializer interface currently does not clearly specify how a ByteBuffer's
position and limit should be treated during and after deserialization.
This ambiguity can lead to inconsistent implementations and incorrect assumptions
by callers.

Changes

  • Clarified the contract for Deserializer#deserialize(String, Headers, ByteBuffer)
    to state that implementations should read from the buffer’s current position,
    may advance the position by the number of bytes consumed, and must not modify
    the buffer limit.
  • Documented that callers should not make assumptions about the buffer position
    after deserialization.

Notes

This change is documentation-only and does not modify runtime behavior.

@github-actions github-actions bot added triage PRs from the community clients small Small PRs and removed triage PRs from the community labels Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant