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

3.x: remove no-arg dematerialize(); remove replay(Scheduler) variants #6539

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

akarnokd
Copy link
Member

This PR removes some obsolete API.

The Flowable.dematerialize() and Observable.dematerialize() were inherently type-unsafe and have been removed. In Rx.NET, the extension methods allowed dematerialize() to be applied to Observable<Notification<T>> only, but there is no way for doing it in Java as it has no extension methods and one can't restrict a method to appear only with a certain type argument scheme.

Thereplay(Scheduler) and other overloads were carried over from the original Rx.NET API set but I can't rememeber if they had any use in the field. Most use cases capture the connectable anyway so there is no much benefit from inlining an observeOn into a connectable:

ConnectableFlowable<Integer> connectable = source.replay();

Flowable<Integr> flowable = connectable.observeOn(Schedulers.io());

// hand flowable to consumers
flowable.subscribe();

connectable.connect();

@akarnokd akarnokd added this to the 3.0 milestone Jun 24, 2019
@akarnokd akarnokd changed the title 3.x: remove no-arg, dematerialize(); remove replay(Scheduler) variants 3.x: remove no-arg dematerialize(); remove replay(Scheduler) variants Jun 24, 2019
@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

Merging #6539 into 3.x will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #6539      +/-   ##
============================================
- Coverage     98.27%   98.16%   -0.12%     
+ Complexity     6214     6198      -16     
============================================
  Files           682      682              
  Lines         45505    45459      -46     
  Branches       6288     6288              
============================================
- Hits          44721    44625      -96     
- Misses          243      276      +33     
- Partials        541      558      +17
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/reactivex/Flowable.java 100% <ø> (ø) 570 <0> (-5) ⬇️
...nal/operators/flowable/FlowableInternalHelper.java 100% <ø> (ø) 14 <0> (-1) ⬇️
src/main/java/io/reactivex/Observable.java 100% <ø> (ø) 545 <0> (-5) ⬇️
...ex/internal/operators/flowable/FlowableReplay.java 91.97% <ø> (-2.5%) 19 <0> (-1)
...nternal/operators/observable/ObservableReplay.java 95.76% <ø> (-2.13%) 19 <0> (-1)
...operators/observable/ObservableInternalHelper.java 100% <ø> (ø) 14 <0> (-1) ⬇️
...ernal/operators/flowable/FlowableFlatMapMaybe.java 90.82% <0%> (-4.84%) 2% <0%> (ø)
...a/io/reactivex/internal/util/QueueDrainHelper.java 95.83% <0%> (-4.17%) 55% <0%> (-3%)
.../operators/observable/ObservableFlatMapSingle.java 88.8% <0%> (-2.99%) 2% <0%> (ø)
...rnal/operators/observable/ObservableSwitchMap.java 93.61% <0%> (-2.66%) 3% <0%> (ø)
... and 22 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 9e9d31c...9ee0786. Read the comment docs.

@akarnokd akarnokd merged commit fb37226 into ReactiveX:3.x Jun 24, 2019
@akarnokd akarnokd deleted the ApiRemovals3x branch June 24, 2019 14:56
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.

1 participant