akka/akka-core

simplify javadsl Flow.recoverWith

Open

#24,992 opened on Apr 26, 2018

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Scala (3,547 forks)batch import
1 - triagedhelp wantedt:stream

Repository metrics

Stars
 (13,277 stars)
PR merge metrics
 (Avg merge 8d 19h) (10 merged PRs in 30d)

Description

PartialFunction is a pain to use in Java and for recoverWith a simple Class<Throwable> parameter would be sufficient.

Similar with mapError. Class<Throwable> parameter and a Function<Exc, Throwable>

By the way, I suggest removing the deprecation of recoverWith since I think in most of the time the attempt count is not interesting, especially since there is no reset of the count or notion of failures per time unit.

Contributor guide