Comment Comment by chrislynch42 I was surprised by the responses about Optionals. Will have to look into it. As an alternative I have been looking to use the following to guarantee that certain methods cannot/will not return null (below). Maybe that is the better way to go?return Optional.ofNullable(applications).orElseThrow(NullPointerException::new);return Optional.ofNullable(applications).orElse(new Application()); parent chrislynch42 8 years ago
return Optional.ofNullable(applications).orElseThrow(NullPointerException::new);
return Optional.ofNullable(applications).orElse(new Application());