Skip to content

fixes DefaultPayload.create(ByteBuf, ByteBuf) to release params #886

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

Merged
merged 1 commit into from
Jul 18, 2020

Conversation

OlegDokuka
Copy link
Member

closes #882

This PR makes DefaultPayload.create(ByteBuf, ByteBuf) behaves consistent with ByteBufPayload.create(ByteBuf, ByteBuf) method.

Please note, both methods do not require a user to take any further actions on releasing provided data and metadata ByteBufs. This is a responsibility of the Payload to do so immediately (in the case of DefaultPayload) or later, upon the release faze (in case of ByteBufPayload)

Signed-off-by: Oleh Dokuka [email protected]

@OlegDokuka OlegDokuka added the bug label Jul 7, 2020
@OlegDokuka OlegDokuka added this to the 1.0.2 milestone Jul 7, 2020
This PR makes `DefaultPayload.create(ByteBuf, ByteBuf)` behaves consistent with `ByteBufPayload.create(ByteBuf, ByteBuf)` method.

Please note, both methods do not require a user to take any further actions on releasing provided data and metadata `ByteBuf`s. This is a responsibility of the Payload to do so immediately (in the case of `DefaultPayload`) or later, upon the release faze (in case of `ByteBufPayload`)

Signed-off-by: Oleh Dokuka <[email protected]>
Copy link
Member

@yschimke yschimke left a comment

Choose a reason for hiding this comment

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

It seems worth documenting this behaviour in javadocs.

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.

DefaultPayload.create(BytBuf data, ByteBuf metadata) should release given BB after content copying
4 participants