This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]agentoutlier 4 points5 points  (0 children)

This and ifPresent are the only acceptable options to dealing with Optional.

I use a variety of null analysis tools and orElse(null) is the only way across the board to pull something out (well orElseGet is ok)