Skip to content

Commit 4377b36

Browse files
Fix TakeLast after removing SingleAssignmentSubscription
- SingleAssignmentSubscription was removed in one merge, TakeLast modified in another merge.
1 parent 0689479 commit 4377b36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rxjava-core/src/main/java/rx/operators/OperationTakeLast.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import rx.Observer;
2626
import rx.Scheduler;
2727
import rx.Subscription;
28-
import rx.subscriptions.SingleAssignmentSubscription;
28+
import rx.subscriptions.BooleanSubscription;
2929
import rx.util.Timestamped;
3030

3131
/**
@@ -156,9 +156,9 @@ public TakeLastTimed(Observable<? extends T> source, int count, long time, TimeU
156156

157157
@Override
158158
public Subscription onSubscribe(Observer<? super T> t1) {
159-
SingleAssignmentSubscription sas = new SingleAssignmentSubscription();
160-
sas.set(source.subscribe(new TakeLastTimedObserver<T>(t1, sas, count, ageMillis, scheduler)));
161-
return sas;
159+
SafeObservableSubscription s = new SafeObservableSubscription();
160+
source.subscribe(new TakeLastTimedObserver<T>(t1, s, count, ageMillis, scheduler));
161+
return s;
162162
}
163163
}
164164
/** Observes source values and keeps the most recent items. */

0 commit comments

Comments
 (0)