Skip to content

Auto-port 5.0: Fix AdaptiveByteBuf._setLongLE calling checked setLongLE - #17101

Merged
franz1981 merged 1 commit into
5.0from
auto-port-pr-17098-to-5.0
Jul 15, 2026
Merged

franz1981 merged 1 commit into
5.0from
auto-port-pr-17098-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17098 to 5.0
Cherry-picked commit: 303d834


Motivation:

AdaptiveByteBuf._setLongLE delegates to the checked setLongLE on the root parent, unlike all other _set/_get methods which use the unchecked underscore-prefixed variants. This adds redundant bounds checking and ensureAccessible() on every little-endian long write.

Modification:

Call rootParent()._setLongLE instead of rootParent().setLongLE.

Result:

_setLongLE now follows the same unchecked pattern as _setLong, _setInt, _setIntLE, etc.

Motivation:

AdaptiveByteBuf._setLongLE delegates to the checked setLongLE on the
root parent, unlike all other _set/_get methods which use the unchecked
underscore-prefixed variants. This adds redundant bounds checking and
ensureAccessible() on every little-endian long write.

Modification:

Call rootParent()._setLongLE instead of rootParent().setLongLE.

Result:

_setLongLE now follows the same unchecked pattern as _setLong, _setInt,
_setIntLE, etc.

(cherry picked from commit 303d834)

@franz1981 franz1981 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.

Lgtm

@franz1981
franz1981 merged commit 8ef58da into 5.0 Jul 15, 2026
13 checks passed
@franz1981
franz1981 deleted the auto-port-pr-17098-to-5.0 branch July 15, 2026 07:01
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.

2 participants