-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align hasCustomOnError behavior of CallbackCompletableObserver with L… #7326
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ambdaObserver, ConsumerSingleObserver and so on
akarnokd
approved these changes
Aug 26, 2021
Codecov Report
@@ Coverage Diff @@
## 3.x #7326 +/- ##
============================================
+ Coverage 99.53% 99.55% +0.02%
+ Complexity 6784 6781 -3
============================================
Files 751 751
Lines 47490 47482 -8
Branches 6378 6378
============================================
+ Hits 47269 47273 +4
+ Misses 102 93 -9
+ Partials 119 116 -3
Continue to review full report at Codecov.
|
This was referenced Aug 30, 2021
This was referenced Oct 18, 2021
1 task
1 task
1 task
1 task
1 task
1 task
1 task
1 task
1 task
1 task
1 task
Closed
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ambdaObserver, ConsumerSingleObserver and so on
Background:
CallbackCompletableObserver.hasCustomOnError
has a different implementation than otherLambdaConsumerIntrospection
implementations. This causeshasCustomOnError
to return true even if one passesFunctions.ON_ERROR_MISSING
toCompletable.subscribe(onComplete, onError)
. In contrast, if one passesFunctions.ON_ERROR_MISSING
toSingle.subscribe(onComplete, onError)
, the ConsumerSingleObserver returns false fromhasCustomOnError
, and the case is the same withSingle
forObservable
,Maybe
andFlowable
. This makesCompletable
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.