I want to extend Optional to include the reason why the optional is empty, but since Optional is final this cannot be done.
I don't want to use Exceptions because most of my code can just handle the fact that the optional is empty and Exceptions don't mix well with Streams. Only some places care about the additional information.
A solution could be to duplicate the method that calculates the value so that there is one version that returns the Optional and one that throws Exceptions. Duplicated code is harder to maintain though.
My question is more about gaining insight about why the Optional class was made final.