53 lines
1.2 KiB
Java
53 lines
1.2 KiB
Java
package j0.l.a;
|
|
|
|
import c.q.a.k.a;
|
|
import j0.l.b.b;
|
|
import java.util.ArrayList;
|
|
import java.util.LinkedList;
|
|
import java.util.List;
|
|
import rx.Subscriber;
|
|
/* compiled from: OperatorToObservableList */
|
|
public class m2 extends Subscriber<T> {
|
|
public boolean i;
|
|
public List<T> j = new LinkedList();
|
|
public final /* synthetic */ b k;
|
|
public final /* synthetic */ Subscriber l;
|
|
|
|
public m2(n2 n2Var, b bVar, Subscriber subscriber) {
|
|
this.k = bVar;
|
|
this.l = subscriber;
|
|
}
|
|
|
|
@Override // j0.g
|
|
public void onCompleted() {
|
|
if (!this.i) {
|
|
this.i = true;
|
|
try {
|
|
ArrayList arrayList = new ArrayList(this.j);
|
|
this.j = null;
|
|
this.k.b(arrayList);
|
|
} catch (Throwable th) {
|
|
a.a0(th);
|
|
onError(th);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // j0.g
|
|
public void onError(Throwable th) {
|
|
this.l.onError(th);
|
|
}
|
|
|
|
@Override // j0.g
|
|
public void onNext(T t) {
|
|
if (!this.i) {
|
|
this.j.add(t);
|
|
}
|
|
}
|
|
|
|
@Override // rx.Subscriber
|
|
public void onStart() {
|
|
request(Long.MAX_VALUE);
|
|
}
|
|
}
|