package h6; import h6.b; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /* loaded from: classes2.dex */ public class g { /* renamed from: a, reason: collision with root package name */ private final Class f10377a; /* renamed from: b, reason: collision with root package name */ private final y.e f10378b; /* renamed from: c, reason: collision with root package name */ private final List f10379c; /* renamed from: d, reason: collision with root package name */ private final String f10380d; public g(Class cls, Class cls2, Class cls3, List list, y.e eVar) { this.f10377a = cls; this.f10378b = eVar; this.f10379c = (List) b7.j.c(list); this.f10380d = "Failed LoadPath{" + cls.getSimpleName() + "->" + cls2.getSimpleName() + "->" + cls3.getSimpleName() + "}"; } private h a(f6.e eVar, e6.j jVar, int i10, int i11, b.a aVar, List list) { int size = this.f10379c.size(); h hVar = null; for (int i12 = 0; i12 < size; i12++) { try { hVar = ((b) this.f10379c.get(i12)).c(eVar, i10, i11, jVar, aVar); } catch (e e10) { list.add(e10); } if (hVar != null) { break; } } if (hVar != null) { return hVar; } throw new e(this.f10380d, new ArrayList(list)); } public h b(f6.e eVar, e6.j jVar, int i10, int i11, b.a aVar) { List list = (List) b7.j.d((List) this.f10378b.b()); try { return a(eVar, jVar, i10, i11, aVar, list); } finally { this.f10378b.a(list); } } public String toString() { return "LoadPath{decodePaths=" + Arrays.toString(this.f10379c.toArray()) + '}'; } }