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

Invalid value check in NioParams.setWriteByteBufferSize #1309

Closed
malliaridis opened this issue May 13, 2024 · 1 comment
Closed

Invalid value check in NioParams.setWriteByteBufferSize #1309

malliaridis opened this issue May 13, 2024 · 1 comment
Labels
Milestone

Comments

@malliaridis
Copy link

malliaridis commented May 13, 2024

Describe the bug

The function NioParams#setWriteByteBufferSize(int writeByteBufferSize) does not check the bounces of the passed argument writeByteBufferSize, but the readbyteBufferSize instead.

Reproduction steps

  1. Create an instance of NioParams
  2. Call setWriteByteBufferSize(-1)

Expected behavior

The bounces of the argument writebyteBufferSize are checked / An IllegalArgumentException is thrown for negative writeByteBufferSizes.

Additional context

It looks like a copy-paste mistake from NioParams.setReadByteBufferSize(int readByteBufferSize).

acogoluegnes added a commit that referenced this issue May 13, 2024
Fixes #1309

(cherry picked from commit 73f0ab8)
@acogoluegnes acogoluegnes added this to the 5.22.0 milestone May 13, 2024
@acogoluegnes
Copy link
Contributor

Fixed, thanks!

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

No branches or pull requests

2 participants