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

Update RxJava from unmaintained 3.0.x to latest 3.1.x #287

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mockito = "org.mockito:mockito-core:4.3.1"
quickTheories = "org.quicktheories:quicktheories:0.25"
reactiveStreams-tck = { module = "org.reactivestreams:reactive-streams-tck", version.ref = "reactiveStreams" }
rxJava2 = "io.reactivex.rxjava2:rxjava:2.2.8"
rxJava3 = "io.reactivex.rxjava3:rxjava:3.0.0"
rxJava3 = "io.reactivex.rxjava3:rxjava:3.1.5"
slf4j = "org.slf4j:slf4j-api:1.7.36"
swt-windows = { module = "org.eclipse.swt:org.eclipse.swt.win32.win32.x86", version.ref = "swt" }
swt-windows64 = { module = "org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64", version.ref = "swt" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static final class FlowableAsFluxSubscriber<T> implements FlowableSubscriber<T>,

Subscription s;

io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T> qs;
io.reactivex.rxjava3.operators.QueueSubscription<T> qs;

public FlowableAsFluxSubscriber(Subscriber<? super T> actual) {
this.actual = actual;
Expand All @@ -234,8 +234,8 @@ public FlowableAsFluxSubscriber(Subscriber<? super T> actual) {
public void onSubscribe(Subscription s) {
if (Operators.validate(this.s, s)) {
this.s = s;
if (s instanceof io.reactivex.rxjava3.internal.fuseable.QueueSubscription) {
this.qs = (io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T>)s;
if (s instanceof io.reactivex.rxjava3.operators.QueueSubscription) {
this.qs = (io.reactivex.rxjava3.operators.QueueSubscription<T>)s;
}

actual.onSubscribe(this);
Expand Down Expand Up @@ -301,13 +301,13 @@ public int requestFusion(int requestedMode) {
}

static final class FlowableAsFluxConditionalSubscriber<T> implements
io.reactivex.rxjava3.internal.fuseable.ConditionalSubscriber<T>, QueueSubscription<T> {
io.reactivex.rxjava3.operators.ConditionalSubscriber<T>, QueueSubscription<T> {

final ConditionalSubscriber<? super T> actual;

Subscription s;

io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T> qs;
io.reactivex.rxjava3.operators.QueueSubscription<T> qs;

public FlowableAsFluxConditionalSubscriber(ConditionalSubscriber<? super T> actual) {
this.actual = actual;
Expand All @@ -318,8 +318,8 @@ public FlowableAsFluxConditionalSubscriber(ConditionalSubscriber<? super T> actu
public void onSubscribe(Subscription s) {
if (Operators.validate(this.s, s)) {
this.s = s;
if (s instanceof io.reactivex.rxjava3.internal.fuseable.QueueSubscription) {
this.qs = (io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T>)s;
if (s instanceof io.reactivex.rxjava3.operators.QueueSubscription) {
this.qs = (io.reactivex.rxjava3.operators.QueueSubscription<T>)s;
}

actual.onSubscribe(this);
Expand Down Expand Up @@ -400,15 +400,15 @@ public FluxAsFlowable(Publisher<T> source) {

@Override
public void subscribeActual(Subscriber<? super T> s) {
if (s instanceof io.reactivex.rxjava3.internal.fuseable.ConditionalSubscriber) {
source.subscribe(new FluxAsFlowableConditionalSubscriber<>((io.reactivex.rxjava3.internal.fuseable.ConditionalSubscriber<? super T>)s));
if (s instanceof io.reactivex.rxjava3.operators.ConditionalSubscriber) {
source.subscribe(new FluxAsFlowableConditionalSubscriber<>((io.reactivex.rxjava3.operators.ConditionalSubscriber<? super T>)s));
} else {
source.subscribe(new FluxAsFlowableSubscriber<>(s));
}
}

static final class FluxAsFlowableSubscriber<T> implements CoreSubscriber<T>,
io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T> {
io.reactivex.rxjava3.operators.QueueSubscription<T> {

final Subscriber<? super T> actual;

Expand Down Expand Up @@ -493,15 +493,15 @@ public boolean offer(T v1, T v2) {
}

static final class FluxAsFlowableConditionalSubscriber<T> implements
Fuseable.ConditionalSubscriber<T>, io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T> {
Fuseable.ConditionalSubscriber<T>, io.reactivex.rxjava3.operators.QueueSubscription<T> {

final io.reactivex.rxjava3.internal.fuseable.ConditionalSubscriber<? super T> actual;
final io.reactivex.rxjava3.operators.ConditionalSubscriber<? super T> actual;

Subscription s;

io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T> qs;
io.reactivex.rxjava3.operators.QueueSubscription<T> qs;

public FluxAsFlowableConditionalSubscriber(io.reactivex.rxjava3.internal.fuseable.ConditionalSubscriber<? super T> actual) {
public FluxAsFlowableConditionalSubscriber(io.reactivex.rxjava3.operators.ConditionalSubscriber<? super T> actual) {
this.actual = actual;
}

Expand All @@ -510,8 +510,8 @@ public FluxAsFlowableConditionalSubscriber(io.reactivex.rxjava3.internal.fuseabl
public void onSubscribe(Subscription s) {
if (Operators.validate(this.s, s)) {
this.s = s;
if (s instanceof io.reactivex.rxjava3.internal.fuseable.QueueSubscription) {
this.qs = (io.reactivex.rxjava3.internal.fuseable.QueueSubscription<T>)s;
if (s instanceof io.reactivex.rxjava3.operators.QueueSubscription) {
this.qs = (io.reactivex.rxjava3.operators.QueueSubscription<T>)s;
}

actual.onSubscribe(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.core.Maybe;
import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.internal.fuseable.QueueSubscription;
import io.reactivex.rxjava3.operators.QueueSubscription;
import io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber;
import io.reactivex.rxjava3.observers.BaseTestConsumer;
import io.reactivex.rxjava3.schedulers.Schedulers;
Expand Down