While this method provides seamless transition from/to Optional, its use
results in the original exception being lost. Deprecate it for removal.
Change-Id: I062ee28917f7a1be583077009307f08c57a67acc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* @return Contained value
* @throws NullPointerException if {@code exceptionMapper} is null
* @throws X When there is no contained value
+ * @deprecated This method is losing the underlying failure cause. Use {@link #orElseThrow(Function)} instead.
*/
+ @Deprecated(forRemoval = true, since = "8.0.2")
public final <X extends Throwable> T orElseThrow(final Supplier<X> supplier) throws X {
requireNonNull(supplier);
if (isFirst()) {