what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzgi.java

200 lines
17 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
import com.google.android.gms.internal.firebase_ml.zzgk;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/* loaded from: classes2.dex */
public abstract class zzgi {
private static WeakHashMap<Class<?>, Field> zzwj = new WeakHashMap<>();
private static final Lock zzwk = new ReentrantLock();
public abstract void close() throws IOException;
public abstract int getIntValue() throws IOException;
public abstract String getText() throws IOException;
public abstract zzge zzgg();
public abstract zzgm zzgh() throws IOException;
public abstract zzgm zzgi();
public abstract String zzgj() throws IOException;
public abstract zzgi zzgk() throws IOException;
public abstract byte zzgl() throws IOException;
public abstract short zzgm() throws IOException;
public abstract float zzgn() throws IOException;
public abstract long zzgo() throws IOException;
public abstract double zzgp() throws IOException;
public abstract BigInteger zzgq() throws IOException;
public abstract BigDecimal zzgr() throws IOException;
public final <T> T zza(Class<T> cls, zzgc zzgcVar) throws IOException {
try {
return (T) zza(cls, false, null);
} finally {
close();
}
}
public final String zza(Set<String> set) throws IOException {
zzgm zzgt = zzgt();
while (zzgt == zzgm.FIELD_NAME) {
String text = getText();
zzgh();
if (set.contains(text)) {
return text;
}
zzgk();
zzgt = zzgh();
}
return null;
}
private final zzgm zzgs() throws IOException {
zzgm zzgi = zzgi();
if (zzgi == null) {
zzgi = zzgh();
}
zzks.checkArgument(zzgi != null, "no JSON input found");
return zzgi;
}
private final zzgm zzgt() throws IOException {
zzgm zzgs = zzgs();
int i = zzgj.zzwl[zzgs.ordinal()];
boolean z = true;
if (i != 1) {
return i != 2 ? zzgs : zzgh();
}
zzgm zzgh = zzgh();
if (zzgh != zzgm.FIELD_NAME && zzgh != zzgm.END_OBJECT) {
z = false;
}
zzks.checkArgument(z, zzgh);
return zzgh;
}
public final Object zza(Type type, boolean z, zzgc zzgcVar) throws IOException {
try {
if (!Void.class.equals(type)) {
zzgs();
}
return zza(null, type, new ArrayList<>(), null, null, true);
} finally {
if (z) {
close();
}
}
}
private final void zza(Field field, Map<String, Object> map, Type type, ArrayList<Type> arrayList, zzgc zzgcVar) throws IOException {
zzgm zzgt = zzgt();
while (zzgt == zzgm.FIELD_NAME) {
String text = getText();
zzgh();
if (zzgcVar != null) {
throw new NoSuchMethodError();
}
map.put(text, zza(field, type, arrayList, map, zzgcVar, true));
zzgt = zzgh();
}
}
/* JADX WARN: Code restructure failed: missing block: B:190:0x027b, code lost:
if (com.google.android.gms.internal.firebase_ml.zzia.zza(r1, (java.lang.Class<?>) java.util.Map.class) == false) goto L190;
*/
/* JADX WARN: Code restructure failed: missing block: B:191:0x027d, code lost:
r2 = true;
*/
/* JADX WARN: Removed duplicated region for block: B:136:0x01c3 A[Catch: IllegalArgumentException -> 0x0440, TryCatch #0 {IllegalArgumentException -> 0x0440, blocks: (B:14:0x002b, B:15:0x0038, B:16:0x003b, B:17:0x041d, B:18:0x043f, B:20:0x0041, B:24:0x004b, B:26:0x0052, B:28:0x005a, B:30:0x0062, B:32:0x006f, B:34:0x0077, B:36:0x0084, B:39:0x008d, B:43:0x00a3, B:48:0x00c5, B:51:0x00cf, B:55:0x00db, B:56:0x00e0, B:59:0x00ab, B:61:0x00b3, B:63:0x00bb, B:66:0x00eb, B:70:0x00f7, B:72:0x00fe, B:77:0x010c, B:81:0x0115, B:86:0x011f, B:91:0x0129, B:96:0x0132, B:101:0x013b, B:106:0x0144, B:109:0x0149, B:110:0x016d, B:111:0x016e, B:113:0x0177, B:115:0x0180, B:117:0x0189, B:119:0x0192, B:121:0x019b, B:123:0x01a4, B:127:0x01ab, B:130:0x01b1, B:134:0x01bd, B:136:0x01c3, B:138:0x01c7, B:140:0x01ca, B:142:0x01cd, B:143:0x01d8, B:145:0x01d9, B:149:0x01e3, B:153:0x01ef, B:158:0x01fa, B:159:0x01ff, B:160:0x0200, B:162:0x0206, B:163:0x0219, B:164:0x0221, B:166:0x0225, B:169:0x023e, B:173:0x020d, B:175:0x0215, B:176:0x0248, B:177:0x0253, B:179:0x0254, B:182:0x0261, B:186:0x026d, B:187:0x0272, B:189:0x0275, B:193:0x0282, B:194:0x0296, B:196:0x029d, B:198:0x02a2, B:200:0x02aa, B:202:0x02b2, B:204:0x02bb, B:207:0x02ca, B:209:0x02ce, B:210:0x02d8, B:212:0x02ec, B:214:0x02f4, B:216:0x0393, B:219:0x0399, B:222:0x03a9, B:224:0x03c2, B:228:0x03ce, B:231:0x03dd, B:234:0x03e9, B:235:0x03f3, B:237:0x03ee, B:226:0x03d4, B:243:0x0309, B:245:0x030d, B:247:0x0316, B:249:0x031c, B:251:0x0322, B:255:0x0329, B:256:0x0330, B:257:0x0331, B:259:0x037d, B:262:0x0362, B:265:0x037a, B:268:0x0385, B:269:0x038a, B:271:0x038b, B:272:0x0390, B:277:0x028d, B:278:0x0292, B:281:0x0411, B:282:0x041c), top: B:13:0x002b }] */
/* JADX WARN: Removed duplicated region for block: B:142:0x01cd A[Catch: IllegalArgumentException -> 0x0440, TryCatch #0 {IllegalArgumentException -> 0x0440, blocks: (B:14:0x002b, B:15:0x0038, B:16:0x003b, B:17:0x041d, B:18:0x043f, B:20:0x0041, B:24:0x004b, B:26:0x0052, B:28:0x005a, B:30:0x0062, B:32:0x006f, B:34:0x0077, B:36:0x0084, B:39:0x008d, B:43:0x00a3, B:48:0x00c5, B:51:0x00cf, B:55:0x00db, B:56:0x00e0, B:59:0x00ab, B:61:0x00b3, B:63:0x00bb, B:66:0x00eb, B:70:0x00f7, B:72:0x00fe, B:77:0x010c, B:81:0x0115, B:86:0x011f, B:91:0x0129, B:96:0x0132, B:101:0x013b, B:106:0x0144, B:109:0x0149, B:110:0x016d, B:111:0x016e, B:113:0x0177, B:115:0x0180, B:117:0x0189, B:119:0x0192, B:121:0x019b, B:123:0x01a4, B:127:0x01ab, B:130:0x01b1, B:134:0x01bd, B:136:0x01c3, B:138:0x01c7, B:140:0x01ca, B:142:0x01cd, B:143:0x01d8, B:145:0x01d9, B:149:0x01e3, B:153:0x01ef, B:158:0x01fa, B:159:0x01ff, B:160:0x0200, B:162:0x0206, B:163:0x0219, B:164:0x0221, B:166:0x0225, B:169:0x023e, B:173:0x020d, B:175:0x0215, B:176:0x0248, B:177:0x0253, B:179:0x0254, B:182:0x0261, B:186:0x026d, B:187:0x0272, B:189:0x0275, B:193:0x0282, B:194:0x0296, B:196:0x029d, B:198:0x02a2, B:200:0x02aa, B:202:0x02b2, B:204:0x02bb, B:207:0x02ca, B:209:0x02ce, B:210:0x02d8, B:212:0x02ec, B:214:0x02f4, B:216:0x0393, B:219:0x0399, B:222:0x03a9, B:224:0x03c2, B:228:0x03ce, B:231:0x03dd, B:234:0x03e9, B:235:0x03f3, B:237:0x03ee, B:226:0x03d4, B:243:0x0309, B:245:0x030d, B:247:0x0316, B:249:0x031c, B:251:0x0322, B:255:0x0329, B:256:0x0330, B:257:0x0331, B:259:0x037d, B:262:0x0362, B:265:0x037a, B:268:0x0385, B:269:0x038a, B:271:0x038b, B:272:0x0390, B:277:0x028d, B:278:0x0292, B:281:0x0411, B:282:0x041c), top: B:13:0x002b }] */
/* JADX WARN: Removed duplicated region for block: B:155:0x01f5 */
/* JADX WARN: Removed duplicated region for block: B:176:0x0248 A[Catch: IllegalArgumentException -> 0x0440, TryCatch #0 {IllegalArgumentException -> 0x0440, blocks: (B:14:0x002b, B:15:0x0038, B:16:0x003b, B:17:0x041d, B:18:0x043f, B:20:0x0041, B:24:0x004b, B:26:0x0052, B:28:0x005a, B:30:0x0062, B:32:0x006f, B:34:0x0077, B:36:0x0084, B:39:0x008d, B:43:0x00a3, B:48:0x00c5, B:51:0x00cf, B:55:0x00db, B:56:0x00e0, B:59:0x00ab, B:61:0x00b3, B:63:0x00bb, B:66:0x00eb, B:70:0x00f7, B:72:0x00fe, B:77:0x010c, B:81:0x0115, B:86:0x011f, B:91:0x0129, B:96:0x0132, B:101:0x013b, B:106:0x0144, B:109:0x0149, B:110:0x016d, B:111:0x016e, B:113:0x0177, B:115:0x0180, B:117:0x0189, B:119:0x0192, B:121:0x019b, B:123:0x01a4, B:127:0x01ab, B:130:0x01b1, B:134:0x01bd, B:136:0x01c3, B:138:0x01c7, B:140:0x01ca, B:142:0x01cd, B:143:0x01d8, B:145:0x01d9, B:149:0x01e3, B:153:0x01ef, B:158:0x01fa, B:159:0x01ff, B:160:0x0200, B:162:0x0206, B:163:0x0219, B:164:0x0221, B:166:0x0225, B:169:0x023e, B:173:0x020d, B:175:0x0215, B:176:0x0248, B:177:0x0253, B:179:0x0254, B:182:0x0261, B:186:0x026d, B:187:0x0272, B:189:0x0275, B:193:0x0282, B:194:0x0296, B:196:0x029d, B:198:0x02a2, B:200:0x02aa, B:202:0x02b2, B:204:0x02bb, B:207:0x02ca, B:209:0x02ce, B:210:0x02d8, B:212:0x02ec, B:214:0x02f4, B:216:0x0393, B:219:0x0399, B:222:0x03a9, B:224:0x03c2, B:228:0x03ce, B:231:0x03dd, B:234:0x03e9, B:235:0x03f3, B:237:0x03ee, B:226:0x03d4, B:243:0x0309, B:245:0x030d, B:247:0x0316, B:249:0x031c, B:251:0x0322, B:255:0x0329, B:256:0x0330, B:257:0x0331, B:259:0x037d, B:262:0x0362, B:265:0x037a, B:268:0x0385, B:269:0x038a, B:271:0x038b, B:272:0x0390, B:277:0x028d, B:278:0x0292, B:281:0x0411, B:282:0x041c), top: B:13:0x002b }] */
/* JADX WARN: Removed duplicated region for block: B:30:0x0062 A[Catch: IllegalArgumentException -> 0x0440, TryCatch #0 {IllegalArgumentException -> 0x0440, blocks: (B:14:0x002b, B:15:0x0038, B:16:0x003b, B:17:0x041d, B:18:0x043f, B:20:0x0041, B:24:0x004b, B:26:0x0052, B:28:0x005a, B:30:0x0062, B:32:0x006f, B:34:0x0077, B:36:0x0084, B:39:0x008d, B:43:0x00a3, B:48:0x00c5, B:51:0x00cf, B:55:0x00db, B:56:0x00e0, B:59:0x00ab, B:61:0x00b3, B:63:0x00bb, B:66:0x00eb, B:70:0x00f7, B:72:0x00fe, B:77:0x010c, B:81:0x0115, B:86:0x011f, B:91:0x0129, B:96:0x0132, B:101:0x013b, B:106:0x0144, B:109:0x0149, B:110:0x016d, B:111:0x016e, B:113:0x0177, B:115:0x0180, B:117:0x0189, B:119:0x0192, B:121:0x019b, B:123:0x01a4, B:127:0x01ab, B:130:0x01b1, B:134:0x01bd, B:136:0x01c3, B:138:0x01c7, B:140:0x01ca, B:142:0x01cd, B:143:0x01d8, B:145:0x01d9, B:149:0x01e3, B:153:0x01ef, B:158:0x01fa, B:159:0x01ff, B:160:0x0200, B:162:0x0206, B:163:0x0219, B:164:0x0221, B:166:0x0225, B:169:0x023e, B:173:0x020d, B:175:0x0215, B:176:0x0248, B:177:0x0253, B:179:0x0254, B:182:0x0261, B:186:0x026d, B:187:0x0272, B:189:0x0275, B:193:0x0282, B:194:0x0296, B:196:0x029d, B:198:0x02a2, B:200:0x02aa, B:202:0x02b2, B:204:0x02bb, B:207:0x02ca, B:209:0x02ce, B:210:0x02d8, B:212:0x02ec, B:214:0x02f4, B:216:0x0393, B:219:0x0399, B:222:0x03a9, B:224:0x03c2, B:228:0x03ce, B:231:0x03dd, B:234:0x03e9, B:235:0x03f3, B:237:0x03ee, B:226:0x03d4, B:243:0x0309, B:245:0x030d, B:247:0x0316, B:249:0x031c, B:251:0x0322, B:255:0x0329, B:256:0x0330, B:257:0x0331, B:259:0x037d, B:262:0x0362, B:265:0x037a, B:268:0x0385, B:269:0x038a, B:271:0x038b, B:272:0x0390, B:277:0x028d, B:278:0x0292, B:281:0x0411, B:282:0x041c), top: B:13:0x002b }] */
/* JADX WARN: Removed duplicated region for block: B:32:0x006f A[Catch: IllegalArgumentException -> 0x0440, TryCatch #0 {IllegalArgumentException -> 0x0440, blocks: (B:14:0x002b, B:15:0x0038, B:16:0x003b, B:17:0x041d, B:18:0x043f, B:20:0x0041, B:24:0x004b, B:26:0x0052, B:28:0x005a, B:30:0x0062, B:32:0x006f, B:34:0x0077, B:36:0x0084, B:39:0x008d, B:43:0x00a3, B:48:0x00c5, B:51:0x00cf, B:55:0x00db, B:56:0x00e0, B:59:0x00ab, B:61:0x00b3, B:63:0x00bb, B:66:0x00eb, B:70:0x00f7, B:72:0x00fe, B:77:0x010c, B:81:0x0115, B:86:0x011f, B:91:0x0129, B:96:0x0132, B:101:0x013b, B:106:0x0144, B:109:0x0149, B:110:0x016d, B:111:0x016e, B:113:0x0177, B:115:0x0180, B:117:0x0189, B:119:0x0192, B:121:0x019b, B:123:0x01a4, B:127:0x01ab, B:130:0x01b1, B:134:0x01bd, B:136:0x01c3, B:138:0x01c7, B:140:0x01ca, B:142:0x01cd, B:143:0x01d8, B:145:0x01d9, B:149:0x01e3, B:153:0x01ef, B:158:0x01fa, B:159:0x01ff, B:160:0x0200, B:162:0x0206, B:163:0x0219, B:164:0x0221, B:166:0x0225, B:169:0x023e, B:173:0x020d, B:175:0x0215, B:176:0x0248, B:177:0x0253, B:179:0x0254, B:182:0x0261, B:186:0x026d, B:187:0x0272, B:189:0x0275, B:193:0x0282, B:194:0x0296, B:196:0x029d, B:198:0x02a2, B:200:0x02aa, B:202:0x02b2, B:204:0x02bb, B:207:0x02ca, B:209:0x02ce, B:210:0x02d8, B:212:0x02ec, B:214:0x02f4, B:216:0x0393, B:219:0x0399, B:222:0x03a9, B:224:0x03c2, B:228:0x03ce, B:231:0x03dd, B:234:0x03e9, B:235:0x03f3, B:237:0x03ee, B:226:0x03d4, B:243:0x0309, B:245:0x030d, B:247:0x0316, B:249:0x031c, B:251:0x0322, B:255:0x0329, B:256:0x0330, B:257:0x0331, B:259:0x037d, B:262:0x0362, B:265:0x037a, B:268:0x0385, B:269:0x038a, B:271:0x038b, B:272:0x0390, B:277:0x028d, B:278:0x0292, B:281:0x0411, B:282:0x041c), top: B:13:0x002b }] */
/* JADX WARN: Removed duplicated region for block: B:77:0x010c A[Catch: IllegalArgumentException -> 0x0440, TryCatch #0 {IllegalArgumentException -> 0x0440, blocks: (B:14:0x002b, B:15:0x0038, B:16:0x003b, B:17:0x041d, B:18:0x043f, B:20:0x0041, B:24:0x004b, B:26:0x0052, B:28:0x005a, B:30:0x0062, B:32:0x006f, B:34:0x0077, B:36:0x0084, B:39:0x008d, B:43:0x00a3, B:48:0x00c5, B:51:0x00cf, B:55:0x00db, B:56:0x00e0, B:59:0x00ab, B:61:0x00b3, B:63:0x00bb, B:66:0x00eb, B:70:0x00f7, B:72:0x00fe, B:77:0x010c, B:81:0x0115, B:86:0x011f, B:91:0x0129, B:96:0x0132, B:101:0x013b, B:106:0x0144, B:109:0x0149, B:110:0x016d, B:111:0x016e, B:113:0x0177, B:115:0x0180, B:117:0x0189, B:119:0x0192, B:121:0x019b, B:123:0x01a4, B:127:0x01ab, B:130:0x01b1, B:134:0x01bd, B:136:0x01c3, B:138:0x01c7, B:140:0x01ca, B:142:0x01cd, B:143:0x01d8, B:145:0x01d9, B:149:0x01e3, B:153:0x01ef, B:158:0x01fa, B:159:0x01ff, B:160:0x0200, B:162:0x0206, B:163:0x0219, B:164:0x0221, B:166:0x0225, B:169:0x023e, B:173:0x020d, B:175:0x0215, B:176:0x0248, B:177:0x0253, B:179:0x0254, B:182:0x0261, B:186:0x026d, B:187:0x0272, B:189:0x0275, B:193:0x0282, B:194:0x0296, B:196:0x029d, B:198:0x02a2, B:200:0x02aa, B:202:0x02b2, B:204:0x02bb, B:207:0x02ca, B:209:0x02ce, B:210:0x02d8, B:212:0x02ec, B:214:0x02f4, B:216:0x0393, B:219:0x0399, B:222:0x03a9, B:224:0x03c2, B:228:0x03ce, B:231:0x03dd, B:234:0x03e9, B:235:0x03f3, B:237:0x03ee, B:226:0x03d4, B:243:0x0309, B:245:0x030d, B:247:0x0316, B:249:0x031c, B:251:0x0322, B:255:0x0329, B:256:0x0330, B:257:0x0331, B:259:0x037d, B:262:0x0362, B:265:0x037a, B:268:0x0385, B:269:0x038a, B:271:0x038b, B:272:0x0390, B:277:0x028d, B:278:0x0292, B:281:0x0411, B:282:0x041c), top: B:13:0x002b }] */
/* JADX WARN: Removed duplicated region for block: B:79:0x0111 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private final java.lang.Object zza(java.lang.reflect.Field r20, java.lang.reflect.Type r21, java.util.ArrayList<java.lang.reflect.Type> r22, java.lang.Object r23, com.google.android.gms.internal.firebase_ml.zzgc r24, boolean r25) throws java.io.IOException {
/*
Method dump skipped, instructions count: 1162
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.firebase_ml.zzgi.zza(java.lang.reflect.Field, java.lang.reflect.Type, java.util.ArrayList, java.lang.Object, com.google.android.gms.internal.firebase_ml.zzgc, boolean):java.lang.Object");
}
private static Field zzb(Class<?> cls) {
Field field = null;
if (cls == null) {
return null;
}
Lock lock = zzwk;
lock.lock();
try {
if (zzwj.containsKey(cls)) {
Field field2 = zzwj.get(cls);
lock.unlock();
return field2;
}
Iterator<zzhl> it = zzhd.zzc(cls).zzhd().iterator();
while (it.hasNext()) {
Field zzhf = it.next().zzhf();
zzgk zzgkVar = (zzgk) zzhf.getAnnotation(zzgk.class);
if (zzgkVar != null) {
Object[] objArr = {cls};
if (!(field == null)) {
throw new IllegalArgumentException(zzla.zzb("Class contains more than one field with @JsonPolymorphicTypeMap annotation: %s", objArr));
}
boolean zza = zzhf.zza(zzhf.getType());
Object[] objArr2 = {cls, zzhf.getType()};
if (!zza) {
throw new IllegalArgumentException(zzla.zzb("Field which has the @JsonPolymorphicTypeMap, %s, is not a supported type: %s", objArr2));
}
zzgk.zza[] zzgu = zzgkVar.zzgu();
HashSet hashSet = new HashSet();
zzks.checkArgument(zzgu.length > 0, "@JsonPolymorphicTypeMap must have at least one @TypeDef");
for (zzgk.zza zzaVar : zzgu) {
boolean add = hashSet.add(zzaVar.zzgv());
Object[] objArr3 = {zzaVar.zzgv()};
if (!add) {
throw new IllegalArgumentException(zzla.zzb("Class contains two @TypeDef annotations with identical key: %s", objArr3));
}
}
field = zzhf;
}
}
zzwj.put(cls, field);
return field;
} finally {
zzwk.unlock();
}
}
}