The orElseThrow signature of Java Optionals requires a single
arg, supplier, that is a lambda function returning the exception
that the user wishes to have thrown if the optional is empty.
In our current storage client code we have an empty-args signature,
which would be surprising to Java users familiar with Optionals.
This commit updates the signature to accept a supplier.
The
orElseThrow
signature of Java Optionals requires a single arg,supplier
, that is a lambda function returning the exception that the user wishes to have thrown if the optional is empty. In our current storage client code we have an empty-args signature, which would be surprising to Java users familiar with Optionals. This commit updates the signature to accept a supplier.