In my Java Optional, Java's Nullness Flaw, and the Kotlin Language blog post, I give lots of examples of the misuse of the Optional class. Here I'm going to discuss a case where it's clearly being used correctly, but still (and surprisingly) isn't quite necessary.
A useful blog post by Brian Goetz shows how Optional was intended to get used. Briefly, he says that it's because this:
return Arrays.asList(enclosingInfo.getEnclosingClass().getDeclaredMethods())
.stream()
.filter(m -> Objects.equals(m.getName(), enclosingInfo.getName())
.filter(m -> Arrays.equals(m.getParameterTypes(), parameterClasses))