Articles

Writing code to make sure that input parameters are not null does not make Java code "safer;" it’s exactly the opposite — it makes code less readable and less safe.

Code With Null-Checks Is Less Readable

It would be difficult to argue that null-checks are attractive. Most of the time, it’s just boilerplate code, which contributes nothing to the "logic" of the method. It is a purely technical construct. Like this one:

Source de l’article sur DZONE