Deprecate CheckedValue.orElseThrow(Supplier)
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / CheckedValue.java
index c1d2d2eca5cb40ed1fc018fa37ea157c3e9dc921..0afa14002a88a55b02a5e0379046f00daa579c6c 100644 (file)
@@ -212,7 +212,9 @@ public class CheckedValue<T, E extends Exception> extends Either<T, E> {
      * @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()) {