package com.ss.android.ugc.aweme.im.sdk.common.controller.utils.gson;

import com.bytedance.covode.number.Covode;
import com.google.gson.h;
import com.google.gson.i;
import com.google.gson.j;
import com.google.gson.p;
import com.google.gson.q;
import com.google.gson.r;
import java.lang.reflect.Type;

public final class IntegerDefaultZeroAdater implements i<Integer>, r<Integer> {
    static {
        Covode.recordClassIndex(86152);
    }

    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Missing exception handler attribute for start block: B:8:0x0021 */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private java.lang.Integer LIZ(com.google.gson.j r3) {
        /*
            r2 = this;
            X.M12.LIZ(r3)
            java.lang.String r1 = r3.LIZJ()     // Catch:{ Exception -> 0x0021 }
            java.lang.String r0 = ""
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)     // Catch:{ Exception -> 0x0021 }
            if (r0 != 0) goto L_0x001b
            java.lang.String r1 = r3.LIZJ()     // Catch:{ Exception -> 0x0021 }
            java.lang.String r0 = "null"
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)     // Catch:{ Exception -> 0x0021 }
            if (r0 == 0) goto L_0x0021
        L_0x001b:
            r0 = 0
            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)     // Catch:{ Exception -> 0x0021 }
            return r0
        L_0x0021:
            int r0 = r3.LJI()     // Catch:{ NumberFormatException -> 0x002a }
            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
            return r0
        L_0x002a:
            r1 = move-exception
            com.google.gson.s r0 = new com.google.gson.s
            r0.<init>(r1)
            throw r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.aweme.im.sdk.common.controller.utils.gson.IntegerDefaultZeroAdater.LIZ(com.google.gson.j):java.lang.Integer");
    }

    public final /* synthetic */ j LIZ(Object obj, q qVar) {
        return new p((Integer) obj);
    }

    public final /* bridge */ /* synthetic */ Object LIZ(j jVar, Type type, h hVar) {
        return LIZ(jVar);
    }
}
