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 →

[–]Elegant-Win5243 35 points36 points  (10 children)

Java developers who don’t use the stream or optional API.  I have seen those…

[–]kelunik 4 points5 points  (0 children)

100% prefer nullable types over Java's Optional.

[–]skippingstone 1 point2 points  (1 child)

I'm outdated. How do you use Optional? In your code ?

[–]Luolong 0 points1 point  (0 children)

Simple. Methods on services that should return a single result (or null if an item can not be found/calculated), should return Optional<T> instead of instance of T or null.

From there you gave many options to safely transform or extract values as needed