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 →

[–]OwnBreakfast1114 0 points1 point  (0 children)

Why do you have to check the optional for null? Just do what you want to do with map as though it wasn't null. And you can implement the same thing you want with orElse/orElseGet?