forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect behavior of ReadOnlyByteBufferBuf.getBytes(int,ByteBuff…
…er) (netty#9125) * Fix incorrect behavior of ReadOnlyByteBufferBuf.getBytes(int,ByteBuffer) Motivation It currently will succeed when the destination is larger than the source range, but the ByteBuf javadoc states this should be a failure, as is the case with all the other implementations. Modifications - Fix logic to fail the bounds check in this case - Remove explicit null check which isn't done in any equivalent method - Add unit test Result More correct/consistent behaviour
- Loading branch information
1 parent
6ee8b65
commit 60de092
Showing
3 changed files
with
16 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters