Convert any @Nullable reference from legacy code to a @NonNull reference by using the Nullsafe utility class:
@Nullable Object myObject = ...
@NonNull Object nonNullObject = Nullsafe.nonNull(myObject);An IllegalArgumentException is thrown in case myObject is null.
To use this project just declare the following dependency inside your POM:
<dependency>
  <groupId>de.xn--ho-hia.quality</groupId>
  <artifactId>null-analysis</artifactId>
  <version>${version.null-analysis}</version>
</dependencyReplace ${version.null-analysis} with the latest release. This project follows the semantic versioning guidelines.
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.
