netty5/common/src
Boris Unckel 2c757d11be
Utilize i.n.u.internal.ObjectUtil to assert Preconditions (commons) (#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 https://github.com/netty/netty/issues/11170
2021-04-22 08:03:24 +02:00
..
main Utilize i.n.u.internal.ObjectUtil to assert Preconditions (commons) (#11170) (#11172) 2021-04-22 08:03:24 +02:00
test Utilize i.n.u.internal.ObjectUtil to assert Preconditions (commons) (#11170) (#11172) 2021-04-22 08:03:24 +02:00