Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ByteBuf.asReadOnly().nioBuffer*() need to return read-only ByteBuffer #14078

Merged
merged 1 commit into from
May 24, 2024

Conversation

normanmaurer
Copy link
Member

Motivation:

We need to ensure that the returned ByteBuffers are also read-only if the ByteBuf is read-only.

Modifications:

  • Correctly return read-only ByteBuffers
  • Add unit tests

Result:

Return correct type of ByteBuffers

@normanmaurer normanmaurer added this to the 4.1.111.Final milestone May 24, 2024
@normanmaurer
Copy link
Member Author

/cc @lhotari

Copy link
Contributor

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you

Motivation:

We need to ensure that the returned ByteBuffers are also read-only if the ByteBuf is read-only.

Modifications:

- Correctly return read-only ByteBuffers
- Add unit tests

Result:

Return correct type of ByteBuffers
@normanmaurer normanmaurer merged commit d7e2de1 into 4.1 May 24, 2024
3 checks passed
@normanmaurer normanmaurer deleted the read_only_nio_buffers branch May 24, 2024 16:33
normanmaurer added a commit that referenced this pull request May 24, 2024
…#14078)

Motivation:

We need to ensure that the returned ByteBuffers are also read-only if
the ByteBuf is read-only.

Modifications:

- Correctly return read-only ByteBuffers
- Add unit tests

Result:

Return correct type of ByteBuffers
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.

None yet

3 participants