Skip to content
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

2.x: Add doAfterTerminate callback to the Single type. #5093

Merged
merged 2 commits into from
Feb 13, 2017

Conversation

VeskoI
Copy link
Contributor

@VeskoI VeskoI commented Feb 12, 2017

As mentioned in THIS StackOverflow question, doAfterTerminate() is currently missing in RxJava2. There's no strong reason for that, so this PR adds support for it.

@akarnokd akarnokd added this to the 2.0 backlog milestone Feb 12, 2017
* @return a Single that emits the same items as the source Single, then invokes the
* {@link Action}
* @see <a href="http://reactivex.io/documentation/operators/do.html">ReactiveX operators documentation: Do</a>
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please add @since 2.0.6 - experimental to the javadoc.

/**
* Calls an action after pushing the current item or an error to the downstream.
* @param <T> the value type
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add @since 2.0.6 - experimental here as well. No need for the @Experimental annotation.

@codecov
Copy link

codecov bot commented Feb 12, 2017

Codecov Report

Merging #5093 into 2.x will increase coverage by 0.11%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##                2.x    #5093      +/-   ##
============================================
+ Coverage     95.52%   95.64%   +0.11%     
- Complexity     5548     5557       +9     
============================================
  Files           614      615       +1     
  Lines         39651    39682      +31     
  Branches       5577     5578       +1     
============================================
+ Hits          37877    37954      +77     
+ Misses          778      745      -33     
+ Partials        996      983      -13
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/reactivex/Single.java 99.29% <100%> (ø) 131 <1> (+1)
...ernal/operators/single/SingleDoAfterTerminate.java 100% <100%> (ø) 2 <2> (?)
...rnal/subscriptions/ArrayCompositeSubscription.java 93.33% <ø> (-6.67%) 17% <ø> (-1%)
.../operators/completable/CompletableConcatArray.java 93.75% <ø> (-6.25%) 2% <ø> (ø)
...l/operators/observable/ObservableFlatMapMaybe.java 92.81% <ø> (-4.58%) 2% <ø> (ø)
...ex/internal/operators/maybe/MaybeTimeoutMaybe.java 94.11% <ø> (-4.42%) 2% <ø> (ø)
.../internal/operators/maybe/MaybeTakeUntilMaybe.java 93.87% <ø> (-4.09%) 2% <ø> (ø)
...io/reactivex/internal/util/BackpressureHelper.java 95.91% <ø> (-4.09%) 21% <ø> (-1%)
...ternal/operators/flowable/FlowableSubscribeOn.java 94.54% <ø> (-3.64%) 2% <ø> (ø)
...operators/observable/ObservableConcatMapEager.java 97.29% <ø> (-2.17%) 2% <ø> (ø)
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28d1352...0d97935. Read the comment docs.

@akarnokd akarnokd merged commit 7bfeccc into ReactiveX:2.x Feb 13, 2017
@akarnokd akarnokd changed the title Add doAfterTerminate callback to the Single type. 2.x: Add doAfterTerminate callback to the Single type. Feb 13, 2017
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.

3 participants