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

Utilize i.n.u.internal.ObjectUtil Preconditions (commons) (#11170) #11172

Merged

Conversation

boris-unckel
Copy link
Contributor

Motivation:

NullChecks resulting in a NullPointerException or IllegalArgumentException, numeric ranges (>0, >=0) checks, not empty strings/arrays checks must never be anonymous but with the parameter or variable name which is checked. They must be specific and should not be done with an "OR-Logic" (if a == null || b == null) throw new NullPointerEx.

Modifications:

  • Add some checks to ObjectUtil not present today but utilized in the code.
  • Add unit test for ObjectUtil
  • Update commmons internal usage with ObjectUtil

Result:

All checks needed are present, subsequent changes of usage of ObjectUtil are possible.

Fixes for #11170
One PR for each subproject to ease review.

@boris-unckel
Copy link
Contributor Author

@normanmaurer Thanks for your offer to check this. The build failed but I cannot see the relation between change and error. Looks like an infrastructure topic? Could you please check and advise?

@boris-unckel boris-unckel force-pushed the 11170_preconditions_objectutils_common branch from 79bc10a to 9ca763e Compare April 21, 2021 11:10
@boris-unckel boris-unckel force-pushed the 11170_preconditions_objectutils_common branch from 9ca763e to ed9a4ed Compare April 21, 2021 11:59
…etty#11170)

Motivation:

NullChecks resulting in a NullPointerException or IllegalArgumentException, numeric ranges (>0, >=0) checks, not empty strings/arrays checks must never be anonymous but with the parameter or variable name which is checked. They must be specific and should not be done with an "OR-Logic" (if a == null || b == null) throw new NullPointerEx.

Modifications:

* Add some checks to ObjectUtil not present today but utilized in the code.
* Add unit test for ObjectUtil
* Update commmons internal usage with ObjectUtil

Result:

All checks needed are present, subsequent changes of usage of ObjectUtil are possible.

Fixes for netty#11170
One PR for each subproject to ease review.
@boris-unckel boris-unckel force-pushed the 11170_preconditions_objectutils_common branch from ed9a4ed to b004f5c Compare April 21, 2021 12:06
@normanmaurer
Copy link
Member

@rkapsi PTAL again

@rkapsi
Copy link
Member

rkapsi commented Apr 22, 2021

LGTM

@normanmaurer normanmaurer merged commit 2c757d1 into netty:4.1 Apr 22, 2021
@normanmaurer
Copy link
Member

@boris-unckel thanks a lot!

@boris-unckel boris-unckel deleted the 11170_preconditions_objectutils_common branch April 22, 2021 06:12
normanmaurer pushed a commit that referenced this pull request Apr 22, 2021
…11170) (#11172)

Motivation:

NullChecks resulting in a NullPointerException or IllegalArgumentException, numeric ranges (>0, >=0) checks, not empty strings/arrays checks must never be anonymous but with the parameter or variable name which is checked. They must be specific and should not be done with an "OR-Logic" (if a == null || b == null) throw new NullPointerEx.

Modifications:

* Add some checks to ObjectUtil not present today but utilized in the code.
* Add unit test for ObjectUtil
* Update commmons internal usage with ObjectUtil

Result:

All checks needed are present, subsequent changes of usage of ObjectUtil are possible.

Fixes for #11170
violetagg added a commit to reactor/reactor-netty that referenced this pull request Apr 28, 2021
The exception message is changed with
netty/netty#11172
violetagg added a commit to reactor/reactor-netty that referenced this pull request Apr 28, 2021
The exception message is changed with
netty/netty#11172
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
…etty#11170) (netty#11172)

Motivation:

NullChecks resulting in a NullPointerException or IllegalArgumentException, numeric ranges (>0, >=0) checks, not empty strings/arrays checks must never be anonymous but with the parameter or variable name which is checked. They must be specific and should not be done with an "OR-Logic" (if a == null || b == null) throw new NullPointerEx.

Modifications:

* Add some checks to ObjectUtil not present today but utilized in the code.
* Add unit test for ObjectUtil
* Update commmons internal usage with ObjectUtil

Result:

All checks needed are present, subsequent changes of usage of ObjectUtil are possible.

Fixes for netty#11170
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.

None yet

5 participants