Skip to content

Commit

Permalink
Removed TERMINATED check in onNext (#5942)
Browse files Browse the repository at this point in the history
* Removed pointless code.

* Removed unnecessary TERMINATED check.
  • Loading branch information
kjkrum authored and akarnokd committed Apr 1, 2018
1 parent 1706fe1 commit 2770e4d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/main/java/io/reactivex/processors/PublishProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ public void onSubscribe(Subscription s) {
@Override
public void onNext(T t) {
ObjectHelper.requireNonNull(t, "onNext called with null. Null values are generally not allowed in 2.x operators and sources.");
if (subscribers.get() == TERMINATED) {
return;
}
for (PublishSubscription<T> s : subscribers.get()) {
s.onNext(t);
}
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/io/reactivex/subjects/PublishSubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,6 @@ public void onSubscribe(Disposable s) {
@Override
public void onNext(T t) {
ObjectHelper.requireNonNull(t, "onNext called with null. Null values are generally not allowed in 2.x operators and sources.");

if (subscribers.get() == TERMINATED) {
return;
}
for (PublishDisposable<T> s : subscribers.get()) {
s.onNext(t);
}
Expand Down

0 comments on commit 2770e4d

Please sign in to comment.