3.x: Widen functional interface throws, replace Callable with Supplier by akarnokd · Pull Request #6511 · ReactiveX/RxJava (original) (raw)
This PR widens the throws Exception
into throws Throwable
in the functional interfaces and adjusts catch (Exception
to catch(Throwable
where needed.
The major change is the replacement of java.util.concurrent.Callable
in almost all API with io.reactivex.functions.Supplier
which is defined with throws Throwable
. Since subinterfaces can't widen the throws clause, only narrow it, Supplier
can't extend Callable
.
fromCallable
remained in all base classes and a separate PR will introduce fromSupplier
.
The single-valued fusion now works with Supplier
and ScalarSupplier
types instead of Callable
and ScalarCallable
(removed).