Skip to content

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

Merged
normanmaurer merged 1 commit into
4.1from
read_only_nio_buffers
May 24, 2024
Merged

normanmaurer merged 1 commit into
4.1from
read_only_nio_buffers

Conversation

@normanmaurer

Copy link
Copy Markdown
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
Copy Markdown
Member Author

/cc @lhotari

@lhotari lhotari left a comment

Copy link
Copy Markdown
Contributor

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 force-pushed the read_only_nio_buffers branch from 325da55 to 88277d6 Compare May 24, 2024 16:33
@normanmaurer
normanmaurer merged commit d7e2de1 into 4.1 May 24, 2024
@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.

3 participants