discord-jadx/app/src/main/java/i0/m.java

71 lines
3.0 KiB
Java
Raw Normal View History

2021-07-24 02:37:17 +00:00
package i0;
import d0.k;
import d0.l;
import f0.z;
import java.lang.reflect.Method;
import java.util.Objects;
import kotlin.KotlinNullPointerException;
import kotlinx.coroutines.CancellableContinuation;
import retrofit2.HttpException;
2021-07-27 00:35:07 +00:00
import retrofit2.Response;
2021-07-24 02:37:17 +00:00
/* compiled from: KotlinExtensions.kt */
public final class m implements f<T> {
public final /* synthetic */ CancellableContinuation a;
public m(CancellableContinuation cancellableContinuation) {
this.a = cancellableContinuation;
}
@Override // i0.f
public void a(d<T> dVar, Throwable th) {
d0.z.d.m.checkParameterIsNotNull(dVar, "call");
d0.z.d.m.checkParameterIsNotNull(th, "t");
CancellableContinuation cancellableContinuation = this.a;
k.a aVar = k.i;
2021-07-27 00:35:07 +00:00
cancellableContinuation.resumeWith(k.m75constructorimpl(l.createFailure(th)));
2021-07-24 02:37:17 +00:00
}
@Override // i0.f
2021-07-27 00:35:07 +00:00
public void b(d<T> dVar, Response<T> response) {
2021-07-24 02:37:17 +00:00
d0.z.d.m.checkParameterIsNotNull(dVar, "call");
2021-07-27 00:35:07 +00:00
d0.z.d.m.checkParameterIsNotNull(response, "response");
if (response.a()) {
T t = response.b;
2021-07-24 02:37:17 +00:00
if (t == 0) {
z c2 = dVar.c();
Objects.requireNonNull(c2);
d0.z.d.m.checkParameterIsNotNull(k.class, "type");
Object cast = k.class.cast(c2.f.get(k.class));
if (cast == null) {
d0.z.d.m.throwNpe();
}
d0.z.d.m.checkExpressionValueIsNotNull(cast, "call.request().tag(Invocation::class.java)!!");
Method method = ((k) cast).a;
StringBuilder sb = new StringBuilder();
sb.append("Response from ");
d0.z.d.m.checkExpressionValueIsNotNull(method, "method");
Class<?> declaringClass = method.getDeclaringClass();
d0.z.d.m.checkExpressionValueIsNotNull(declaringClass, "method.declaringClass");
sb.append(declaringClass.getName());
sb.append('.');
sb.append(method.getName());
sb.append(" was null but response body type was declared as non-null");
KotlinNullPointerException kotlinNullPointerException = new KotlinNullPointerException(sb.toString());
CancellableContinuation cancellableContinuation = this.a;
k.a aVar = k.i;
2021-07-27 00:35:07 +00:00
cancellableContinuation.resumeWith(k.m75constructorimpl(l.createFailure(kotlinNullPointerException)));
2021-07-24 02:37:17 +00:00
return;
}
CancellableContinuation cancellableContinuation2 = this.a;
k.a aVar2 = k.i;
2021-07-27 00:35:07 +00:00
cancellableContinuation2.resumeWith(k.m75constructorimpl(t));
2021-07-24 02:37:17 +00:00
return;
}
CancellableContinuation cancellableContinuation3 = this.a;
2021-07-27 00:35:07 +00:00
HttpException httpException = new HttpException(response);
2021-07-24 02:37:17 +00:00
k.a aVar3 = k.i;
2021-07-27 00:35:07 +00:00
cancellableContinuation3.resumeWith(k.m75constructorimpl(l.createFailure(httpException)));
2021-07-24 02:37:17 +00:00
}
}