Align hasCustomOnError behavior of CallbackCompletableObserver with L… by hqzxzwb · Pull Request #7326 · ReactiveX/RxJava · GitHub
Skip to content

Align hasCustomOnError behavior of CallbackCompletableObserver with L…#7326

Merged
akarnokd merged 1 commit into
ReactiveX:3.xfrom
hqzxzwb:3.x
Aug 26, 2021
Merged

Align hasCustomOnError behavior of CallbackCompletableObserver with L…#7326
akarnokd merged 1 commit into
ReactiveX:3.xfrom
hqzxzwb:3.x

Conversation

@hqzxzwb

@hqzxzwb hqzxzwb commented Aug 26, 2021

Copy link
Copy Markdown
Contributor

…ambdaObserver, ConsumerSingleObserver and so on

Background:
CallbackCompletableObserver.hasCustomOnError has a different implementation than other LambdaConsumerIntrospection implementations. This causes hasCustomOnError to return true even if one passes Functions.ON_ERROR_MISSING to Completable.subscribe(onComplete, onError). In contrast, if one passes Functions.ON_ERROR_MISSING to Single.subscribe(onComplete, onError), the ConsumerSingleObserver returns false from hasCustomOnError, and the case is the same with Single for Observable, Maybe and Flowable. This makes Completable a bit unnecessarily special.

Changes made:
Use the same strategy from other observable classes.

Might be breaking:
This change is making ABI changes on CallbackCompletableObserver. I am not sure if we need to maintain ABI stability even for classes in internal package. If it is needed, I am happy to add one more commit to keepCallbackCompletableObserver's ABI stable.

…ambdaObserver, ConsumerSingleObserver and so on
@akarnokd akarnokd added this to the 3.1-support milestone Aug 26, 2021
@codecov

codecov Bot commented Aug 26, 2021

Copy link
Copy Markdown

@akarnokd akarnokd merged commit 939b5ce into ReactiveX:3.x Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants