GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use the real parameter names in argument-check messages by Dhairya-007 · Pull Request #18309 · netty/netty

Conversation

@Dhairya-007

@Dhairya-007 Dhairya-007 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Five ObjectUtil checks pass a name that does not match the parameter being checked, so the resulting NullPointerException / IllegalArgumentException points the caller at a name that is not in the signature:

File Parameter Message said
NioIoHandler executor executionContext
DefaultHttp2HeadersEncoder sensitivityDetector sensitiveDetector
DefaultHttp2RemoteFlowController streamByteDistributor streamWriteDistributor
BoundedInputStream maxBytesRead maxRead
DefaultSocks5InitialRequest authMethods authSchemes

In each case the sibling checks in the same constructor already use the actual parameter name (selectorProvider, hpackEncoder, connection, ...), so these look like copy/paste leftovers.

No behaviour changes and no test asserts on these strings. Note the authSchemes name is correct in the legacy codec-socks v4 classes, where it really is the field name — only the socksx/v5 occurrence is changed here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Dhairya-007
Use the real parameter names in argument-check messages
10fc338
Five ObjectUtil checks named a parameter that does not exist on the
method, so the NullPointerException or IllegalArgumentException pointed
at a name the caller cannot find in the signature. Each sibling check in
the same constructor already uses the actual name.
@normanmaurer normanmaurer added this to the 4.2.21.Final milestone Nov 9, 2026
@normanmaurer normanmaurer added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Nov 9, 2026
@normanmaurer
normanmaurer merged commit fdff853 into netty:4.2 Nov 9, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot

netty-project-bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 4.1.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot netty-project-bot mentioned this pull request Nov 9, 2026
Auto-port 5.0: Use the real parameter names in argument-check messages #18315
Merged
@netty-project-bot

netty-project-bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #18315

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Nov 9, 2026
@testlens-app

testlens-app Bot commented Nov 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🚨 Jobs failed without executing tests 🚨

Failed Jobs without Test Failures

❌ Auto-port to 4.1 / Auto-porting to 4.1

🏷️ Commit: 10fc338
▶️ Tests: 0 executed
⚪️ Checks: 7/7 completed

Rerun Controls

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer normanmaurer removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label Nov 9, 2026
normanmaurer pushed a commit that referenced this pull request Nov 9, 2026
@netty-project-bot @Dhairya-007
Auto-port 5.0: Use the real parameter names in argument-check messages (
31935ba
#18315)

Auto-port of #18309 to 5.0
Cherry-picked commit: fdff853

---
Five `ObjectUtil` checks pass a name that does not match the parameter
being checked, so the resulting `NullPointerException` /
`IllegalArgumentException` points the caller at a name that is not in
the signature:

| File | Parameter | Message said |
|---|---|---|
| `NioIoHandler` | `executor` | `executionContext` |
| `DefaultHttp2HeadersEncoder` | `sensitivityDetector` |
`sensitiveDetector` |
| `DefaultHttp2RemoteFlowController` | `streamByteDistributor` |
`streamWriteDistributor` |
| `BoundedInputStream` | `maxBytesRead` | `maxRead` |
| `DefaultSocks5InitialRequest` | `authMethods` | `authSchemes` |

In each case the sibling checks in the same constructor already use the
actual parameter name (`selectorProvider`, `hpackEncoder`, `connection`,
...), so these look like copy/paste leftovers.

No behaviour changes and no test asserts on these strings. Note the
`authSchemes` name is correct in the legacy `codec-socks` v4 classes,
where it really is the field name — only the `socksx/v5` occurrence is
changed here.

Co-authored-by: dhairya05 <[email protected]>
@Dhairya-007
Dhairya-007 deleted the fix/argument-check-names branch November 9, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.2.21.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Dhairya-007 @netty-project-bot @normanmaurer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.