Skip to content

Commit 2770e4d

Browse files
kjkrumakarnokd
authored andcommitted
Removed TERMINATED check in onNext (#5942)
* Removed pointless code. * Removed unnecessary TERMINATED check.
1 parent 1706fe1 commit 2770e4d

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/main/java/io/reactivex/processors/PublishProcessor.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ public void onSubscribe(Subscription s) {
189189
@Override
190190
public void onNext(T t) {
191191
ObjectHelper.requireNonNull(t, "onNext called with null. Null values are generally not allowed in 2.x operators and sources.");
192-
if (subscribers.get() == TERMINATED) {
193-
return;
194-
}
195192
for (PublishSubscription<T> s : subscribers.get()) {
196193
s.onNext(t);
197194
}

src/main/java/io/reactivex/subjects/PublishSubject.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,6 @@ public void onSubscribe(Disposable s) {
225225
@Override
226226
public void onNext(T t) {
227227
ObjectHelper.requireNonNull(t, "onNext called with null. Null values are generally not allowed in 2.x operators and sources.");
228-
229-
if (subscribers.get() == TERMINATED) {
230-
return;
231-
}
232228
for (PublishDisposable<T> s : subscribers.get()) {
233229
s.onNext(t);
234230
}

0 commit comments

Comments
 (0)