This post discusses techniques to avoid NullPointerException in Java code. It covers null-checking in constructors, enforcing null-checks programmatically, and using Optional in the domain model.
Table of contents
Author(s)Self-Validating ModelGetters returning OptionalPre-instantiate sub-structuresConclusionSort: