Skip to content

Fix the initialization of Completable.complete() #4146

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

Merged
merged 1 commit into from
Jun 29, 2016
Merged
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
8 changes: 4 additions & 4 deletions src/main/java/rx/Completable.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ public void call(CompletableSubscriber s) {
s.onSubscribe(Subscriptions.unsubscribed());
s.onCompleted();
}
}, true); // hook is handled in complete()
}, false); // hook is handled in complete()

/** Single instance of a never Completable. */
static final Completable NEVER = new Completable(new CompletableOnSubscribe() {
@Override
public void call(CompletableSubscriber s) {
s.onSubscribe(Subscriptions.unsubscribed());
}
}, true); // hook is handled in never()
}, false); // hook is handled in never()

/**
* Returns a Completable which terminates as soon as one of the source Completables
Expand Down Expand Up @@ -315,7 +315,7 @@ public static Completable complete() {
if (cos == COMPLETE.onSubscribe) {
return COMPLETE;
}
return new Completable(cos, true);
return new Completable(cos, false);
}

/**
Expand Down Expand Up @@ -742,7 +742,7 @@ public static Completable never() {
if (cos == NEVER.onSubscribe) {
return NEVER;
}
return new Completable(cos, true);
return new Completable(cos, false);
}

/**
Expand Down