2021-06-27 20:44:35 +00:00
|
|
|
package j0.l.a;
|
|
|
|
|
|
|
|
import j0.g;
|
|
|
|
import j0.o.l;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import rx.Observable;
|
|
|
|
import rx.Subscriber;
|
|
|
|
import rx.exceptions.CompositeException;
|
|
|
|
/* compiled from: OnSubscribeDoOnEach */
|
|
|
|
public class k<T> implements Observable.a<T> {
|
|
|
|
public final g<? super T> i;
|
|
|
|
public final Observable<T> j;
|
|
|
|
|
|
|
|
/* compiled from: OnSubscribeDoOnEach */
|
|
|
|
public static final class a<T> extends Subscriber<T> {
|
|
|
|
public final Subscriber<? super T> i;
|
|
|
|
public final g<? super T> j;
|
|
|
|
public boolean k;
|
|
|
|
|
|
|
|
public a(Subscriber<? super T> subscriber, g<? super T> gVar) {
|
|
|
|
super(subscriber);
|
|
|
|
this.i = subscriber;
|
|
|
|
this.j = gVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onCompleted() {
|
|
|
|
if (!this.k) {
|
|
|
|
try {
|
|
|
|
this.j.onCompleted();
|
|
|
|
this.k = true;
|
|
|
|
this.i.onCompleted();
|
|
|
|
} catch (Throwable th) {
|
2021-06-27 20:53:42 +00:00
|
|
|
c.q.a.k.a.a0(th);
|
2021-06-27 20:44:35 +00:00
|
|
|
onError(th);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onError(Throwable th) {
|
|
|
|
if (this.k) {
|
|
|
|
l.b(th);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.k = true;
|
|
|
|
try {
|
|
|
|
this.j.onError(th);
|
|
|
|
this.i.onError(th);
|
|
|
|
} catch (Throwable th2) {
|
2021-06-27 20:53:42 +00:00
|
|
|
c.q.a.k.a.a0(th2);
|
2021-06-27 20:44:35 +00:00
|
|
|
this.i.onError(new CompositeException(Arrays.asList(th, th2)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onNext(T t) {
|
|
|
|
if (!this.k) {
|
|
|
|
try {
|
|
|
|
this.j.onNext(t);
|
|
|
|
this.i.onNext(t);
|
|
|
|
} catch (Throwable th) {
|
2021-06-27 20:53:42 +00:00
|
|
|
c.q.a.k.a.b0(th, this, t);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public k(Observable<T> observable, g<? super T> gVar) {
|
|
|
|
this.j = observable;
|
|
|
|
this.i = gVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action1
|
|
|
|
public void call(Object obj) {
|
|
|
|
this.j.j0(new a((Subscriber) obj, this.i));
|
|
|
|
}
|
|
|
|
}
|