File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
main/java/rx/internal/operators
test/java/rx/internal/operators Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1515 */
1616package rx .internal .operators ;
1717
18- import java .nio .BufferOverflowException ;
1918import java .util .Queue ;
2019import java .util .concurrent .ConcurrentLinkedQueue ;
2120import java .util .concurrent .atomic .AtomicBoolean ;
2423import rx .Observable .Operator ;
2524import rx .Producer ;
2625import rx .Subscriber ;
26+ import rx .exceptions .MissingBackpressureException ;
2727import rx .functions .Action0 ;
2828
2929public class OperatorOnBackpressureBuffer <T > implements Operator <T , T > {
@@ -111,7 +111,7 @@ private boolean ensureCapacity() {
111111 if (currCapacity <= 0 ) {
112112 if (saturated .compareAndSet (false , true )) {
113113 // ensure single completion contract
114- child .onError (new BufferOverflowException ( ));
114+ child .onError (new MissingBackpressureException ( "Overflowed buffer of " + OperatorOnBackpressureBuffer . this . capacity ));
115115 unsubscribe ();
116116 if (onOverflow != null ) {
117117 onOverflow .call ();
Original file line number Diff line number Diff line change 2828import rx .Observer ;
2929import rx .Subscriber ;
3030import rx .Subscription ;
31+ import rx .exceptions .MissingBackpressureException ;
3132import rx .functions .Action0 ;
3233import rx .observables .ConnectableObservable ;
3334import rx .observers .TestSubscriber ;
@@ -142,7 +143,7 @@ public void call() {
142143
143144 assertEquals (500 , ts .getOnNextEvents ().size ());
144145 assertEquals (0 , ts .getOnNextEvents ().get (0 ).intValue ());
145- assertTrue (ts .getOnErrorEvents ().get (0 ) instanceof BufferOverflowException );
146+ assertTrue (ts .getOnErrorEvents ().get (0 ) instanceof MissingBackpressureException );
146147 assertTrue (s .isUnsubscribed ());
147148
148149 }
You can’t perform that action at this time.
0 commit comments