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

Deprecate Unpooled.unmodifiableBuffer(ByteBuf...) #8096

Merged
merged 1 commit into from
Jul 7, 2018

Conversation

njhill
Copy link
Member

@njhill njhill commented Jul 3, 2018

Motivation:

#8040 introduced Unpooled.wrappedUnmodifiableBuffer(ByteBuf...) which has the same behaviour but wraps the provided array directly. This is preferred for most uses (including varargs-based use) and if there are any unusual cases of an explicit array which is re-used before the ByteBuf is finished with, it can just be copied first.

Modifications:

Added @Deprecated annotation and corresponding javadoc addition to Unpooled.unmodifiableBuffer(ByteBuf...).

Result:

Unpooled.unmodifiableBuffer(ByteBuf...) will be deprecated.

Motivation:

Recent PR netty#8040 introduced
Unpooled.wrappedUnmodifiableBuffer(ByteBuf...) which has the same
behaviour but wraps the provided array directly. This is preferred for
most uses (including varargs-based use) and if there are any unusual
cases of an explicit array which is re-used before the ByteBuf is
finished with, it can just be copied first.

Modifications:

Added @deprecated annotation and javadoc to
Unpooled.unmodifiableBuffer(ByteBuf...).

Result:

Unpooled.unmodifiableBuffer(ByteBuf...) will be deprecated.
@normanmaurer normanmaurer merged commit fef462c into netty:4.1 Jul 7, 2018
@normanmaurer normanmaurer self-assigned this Jul 7, 2018
@normanmaurer normanmaurer added this to the 4.1.26.Final milestone Jul 7, 2018
@normanmaurer
Copy link
Member

@njhill thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants