oscerd commented on PR #26781: URL: https://github.com/apache/camel/pull/26781#issuecomment-5810648973
Thanks — both folded in. 1. Adopted `ByteBufUtil.getBytes(buffer)`. You're right the `retain()`/`release()` guarded nothing once the shortcut was gone — `getBytes(int, byte[])` doesn't touch the refcount, and `retain()` on a zero-refcount buffer throws rather than protects — and `ByteBufUtil.getBytes` is the same `readerIndex()..readableBytes()` copy with netty's own fast paths. The method is a one-liner now; the regression test is unchanged and still green. 2. Added an upgrade-guide note under `=== camel-netty` in `camel-4x-upgrade-guide-4_23.adoc` for the live-array → copy change. _(The 4_23 guide only exists on `main`, so the backport bot will drop that hunk when porting to 4.22.x/4.18.x — matches the usual "guide edits stay on main" handling.)_ _Claude Code on behalf of oscerd_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
