121 lines
4.2 KiB
Java
121 lines
4.2 KiB
Java
|
package i0;
|
||
|
|
||
|
import i0.g0.w;
|
||
|
import i0.h;
|
||
|
import java.io.IOException;
|
||
|
import java.lang.annotation.Annotation;
|
||
|
import java.lang.reflect.Type;
|
||
|
import kotlin.Unit;
|
||
|
import okhttp3.RequestBody;
|
||
|
import okhttp3.ResponseBody;
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
public final class c extends h.a {
|
||
|
public boolean a = true;
|
||
|
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
public static final class a implements h<ResponseBody, ResponseBody> {
|
||
|
public static final a a = new a();
|
||
|
|
||
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
||
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
||
|
@Override // i0.h
|
||
|
public ResponseBody convert(ResponseBody responseBody) throws IOException {
|
||
|
ResponseBody responseBody2 = responseBody;
|
||
|
try {
|
||
|
return d0.a(responseBody2);
|
||
|
} finally {
|
||
|
responseBody2.close();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
public static final class b implements h<RequestBody, RequestBody> {
|
||
|
public static final b a = new b();
|
||
|
|
||
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
||
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
||
|
@Override // i0.h
|
||
|
public RequestBody convert(RequestBody requestBody) throws IOException {
|
||
|
return requestBody;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
/* renamed from: i0.c$c reason: collision with other inner class name */
|
||
|
public static final class C0312c implements h<ResponseBody, ResponseBody> {
|
||
|
public static final C0312c a = new C0312c();
|
||
|
|
||
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
||
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
||
|
@Override // i0.h
|
||
|
public ResponseBody convert(ResponseBody responseBody) throws IOException {
|
||
|
return responseBody;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
public static final class d implements h<Object, String> {
|
||
|
public static final d a = new d();
|
||
|
|
||
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
||
|
@Override // i0.h
|
||
|
public String convert(Object obj) throws IOException {
|
||
|
return obj.toString();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
public static final class e implements h<ResponseBody, Unit> {
|
||
|
public static final e a = new e();
|
||
|
|
||
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
||
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
||
|
@Override // i0.h
|
||
|
public Unit convert(ResponseBody responseBody) throws IOException {
|
||
|
responseBody.close();
|
||
|
return Unit.a;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* compiled from: BuiltInConverters */
|
||
|
public static final class f implements h<ResponseBody, Void> {
|
||
|
public static final f a = new f();
|
||
|
|
||
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
||
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
||
|
@Override // i0.h
|
||
|
public Void convert(ResponseBody responseBody) throws IOException {
|
||
|
responseBody.close();
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // i0.h.a
|
||
|
public h<?, RequestBody> requestBodyConverter(Type type, Annotation[] annotationArr, Annotation[] annotationArr2, z zVar) {
|
||
|
if (RequestBody.class.isAssignableFrom(d0.f(type))) {
|
||
|
return b.a;
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override // i0.h.a
|
||
|
public h<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotationArr, z zVar) {
|
||
|
if (type == ResponseBody.class) {
|
||
|
return d0.i(annotationArr, w.class) ? C0312c.a : a.a;
|
||
|
}
|
||
|
if (type == Void.class) {
|
||
|
return f.a;
|
||
|
}
|
||
|
if (!this.a || type != Unit.class) {
|
||
|
return null;
|
||
|
}
|
||
|
try {
|
||
|
return e.a;
|
||
|
} catch (NoClassDefFoundError unused) {
|
||
|
this.a = false;
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|