Description
Version 3.0.0-RC2 - August 20, 2019 (Maven)
This is an early release for 3.0.0 to allow preparations for the breaking API changes and cleanups.
Please check out the wiki page What's different in 3.0 from time to time for the details and migration guide.
Major change
After considering several factors, the components of RxJava 3 have been moved to a new base package to avoid class file conflicts due to having v2 and v3 in the same project. The new base package is io.reactivex.rxjava3
and the base types will live in io.reactivex.rxjava3.core
:
Name | v2 | v3 |
---|---|---|
Base package | io.reactivex |
io.reactivex.rxjava3 |
Flowable |
io.reactivex.Flowable |
io.reactivex.rxjava3.core.Flowable |
PublishSubject |
io.reactivex.subjects.PublishSubject |
io.reactivex.rxjava3.subjects.PublishSubject |
ConnectableObservable |
io.reactivex.observables.ConnectableObservable |
io.reactivex.rxjava3.observables.ConnectableObservable |
Function |
io.reactivex.functions.Function |
io.reactivex.rxjava3.functions.Function |
etc. |
Flowable
s of the two versions can talk to each other without bridges because both implement the Reactive Streams' interfaces such as Publisher
:
io.reactivex.Flowable.range(1, 10)
.flatMap(v -> io.reactivex.rxjava3.core.Flowable.just(v * 10))
.subscribeWith(new io.reactivex.rxjava3.subscribers.TestSubscriber<>())
.assertResult(10, 20, 30, 40, 50, 60, 70, 80, 90, 100);
The other reactive types do not share such base interfaces (they have their own respective copies) and will require bridges, likely provided via 3rd party libraries as with v1->v2 or v1->v3 bridges.
Dependency changes
- Upgrade to Reactive Streams 1.0.3-RC1 (3.x: Refactor to io.reactivex.rxjava3.** #6621)
API changes
- Widen throws on the
XOnSubscribe
interfaces (3.x: widen throws on the XOnSubscribe interfaces #6579)
Behavior changes
- Constrain upstream requests of
elementAt
andfirst
operators (3.x: elementAt, first - constrain upstream requests #6620)
Bugfixes
- Fix
switchMaps
inconsistency swallowing errors when cancelled (3.x: fix switchMaps inconsistency swallowing errors when cancelled #6572) - Fix
ObservableBlockingSubscribe
compares TERMINATED with wrong object (Fix issue #6576 - ObservableBlockingSubscribe compares BlockingObserver.TERMINATED with wrong object #6577) - Fix truncation bugs in
replay()
andReplaySubject
/Processor
(3.x: Fix truncation bugs in replay() and ReplaySubject/Processor #6582) - Fix
mergeWith
not cancelling the other source if the main errors (3.x: Fix mergeWith not cancelling the other source if the main errors #6598) - Fix
refCount
not resetting when termination triggers cross-cancel (3.x: Fix refCount not resetting when termination triggers cross-cancel #6609) - Fix many operators swallowing undeliverable exceptions (3.x: Fix many operators swallowing undeliverable exceptions #6612)
- Fix
switchMap
incorrect sync-fusion & error management (3.x: Fix switchMap incorrect sync-fusion & error management #6616)
Documentation enhancements
No changes in this release.
Other
- Create a base test class and have all unit tests extend it (Create a base test class and have all unit tests extend it #6589, Have unit tests extends
RxJavaTest
- 2 #6594, Have unit tests extendsRxJavaTest
- 3 #6595, 3.x: Haveinternal.operator.flowable
unit tests extendsRxJavaTest
- 4 #6600, 3.x: Have unit tests extendsRxJavaTest
- 5 #6604, 3.x: Haveinternal.operator.observable
unit tests extendsRxJavaTest
- 6 #6607) - Refactor to
io.reactivex.rxjava3.**
(3.x: Refactor to io.reactivex.rxjava3.** #6621)