Skip to content

Commit af4fc88

Browse files
Remove unnecessary code
1 parent a7f80c3 commit af4fc88

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

rxjava-core/src/main/java/rx/internal/operators/BufferUntilSubscriber.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ boolean casFirst(int expected, int next) {
8181
void setObserverRef(Observer<? super T> o) {
8282
observerRef = o;
8383
}
84-
boolean casObserverRef(Observer<? super T> expected, Observer<? super T> next) {
85-
return OBSERVER_UPDATER.compareAndSet(this, expected, next);
86-
}
8784
}
8885

8986
static final class OnSubscribeAction<T> implements OnSubscribe<T> {
@@ -188,7 +185,7 @@ private void drainIfNeededAndSwitchToActual() {
188185
}
189186
// now we can safely change over to the actual and get rid of the pass-thru
190187
// but only if not unsubscribed
191-
state.casObserverRef(this, actual);
188+
state.setObserverRef(actual);
192189
}
193190

194191
}

0 commit comments

Comments
 (0)