When you say "the supplier function itself is null" in the above quote, did you mean to say if the supplier function itself is missing?Optional's orElseGet method takes a java.util.function.Supplier function as an argument and invokes that function to get a value if the Optional itself is empty. Just like the orElse method, this method does not throw any exception even if the Supplier returns null. It does, however, throw a NullPointerException if the Optional is empty and the supplier function itself is null.
Thanks.
Schmichael