what-the-bank/sources/o/fYR.java

81 lines
2.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import io.reactivex.rxjava3.exceptions.CompositeException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes.dex */
public final class fYR {
public static final Throwable b = new HBt();
public static RuntimeException c(Throwable th) {
if (th instanceof Error) {
throw ((Error) th);
}
if (th instanceof RuntimeException) {
return (RuntimeException) th;
}
return new RuntimeException(th);
}
public static boolean c(AtomicReference<Throwable> atomicReference, Throwable th) {
while (true) {
Throwable th2 = atomicReference.get();
if (th2 == b) {
return false;
}
Throwable compositeException = th2 == null ? th : new CompositeException(th2, th);
while (!atomicReference.compareAndSet(th2, compositeException)) {
if (atomicReference.get() != th2) {
break;
}
}
return true;
}
}
public static Throwable b(AtomicReference<Throwable> atomicReference) {
Throwable th = atomicReference.get();
Throwable th2 = b;
return th != th2 ? atomicReference.getAndSet(th2) : th;
}
public static String a(long j, TimeUnit timeUnit) {
StringBuilder sb = new StringBuilder("The source did not signal an event for ");
sb.append(j);
sb.append(" ");
sb.append(timeUnit.toString().toLowerCase());
sb.append(" and has been terminated.");
return sb.toString();
}
/* loaded from: classes.dex */
static final class HBt extends Throwable {
@Override // java.lang.Throwable
public final Throwable fillInStackTrace() {
return this;
}
HBt() {
super("No further exceptions");
}
}
public static NullPointerException c(String str) {
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(" Null values are generally not allowed in 3.x operators and sources.");
return new NullPointerException(sb.toString());
}
public static <T> T d(T t, String str) {
if (t != null) {
return t;
}
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(" Null values are generally not allowed in 3.x operators and sources.");
throw new NullPointerException(sb.toString());
}
}