top | item 40556022

(no title)

wh0knows | 1 year ago

Inputs to standard libraries will obviously never NPE if you pass in a non-null value. For outputs, a lot of standard collection .get() calls are unnecessary when you’re working with small collections or Optionals, where you simply use stream, filter, ifPresent.

Or simply wrap the return with Optional.ofNullable, checkstyle will not accept it if you don’t.

discuss

order

No comments yet.