package o; import com.airbnb.deeplinkdispatch.UrlTreeKt; import com.bumptech.glide.load.engine.GlideException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import o.C2582ahN; import o.RDy; /* renamed from: o.YsJ, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public final class C1239YsJ { private final RDy.Sts> a; private final List> c; private final Class d; private final String e; public C1239YsJ(Class cls, Class cls2, Class cls3, List> list, RDy.Sts> sts) { this.d = cls; this.a = sts; if (!list.isEmpty()) { this.c = list; StringBuilder sb = new StringBuilder("Failed LoadPath{"); sb.append(cls.getSimpleName()); sb.append("->"); sb.append(cls2.getSimpleName()); sb.append("->"); sb.append(cls3.getSimpleName()); sb.append(UrlTreeKt.componentParamSuffix); this.e = sb.toString(); return; } throw new IllegalArgumentException("Must not be empty."); } public final Ezi e(Box box, unA una, int i, int i2, C2582ahN.Sts sts) throws GlideException { List d = this.a.d(); if (d != null) { List list = d; try { return c(box, una, i, i2, sts, list); } finally { this.a.d(list); } } throw new NullPointerException("Argument must not be null"); } private Ezi c(Box box, unA una, int i, int i2, C2582ahN.Sts sts, List list) throws GlideException { int size = this.c.size(); Ezi ezi = null; for (int i3 = 0; i3 < size; i3++) { C2582ahN c2582ahN = this.c.get(i3); try { ezi = c2582ahN.c.e(sts.e(c2582ahN.a(box, i, i2, una)), una); } catch (GlideException e) { list.add(e); } if (ezi != null) { break; } } if (ezi != null) { return ezi; } throw new GlideException(this.e, new ArrayList(list)); } public final String toString() { StringBuilder sb = new StringBuilder("LoadPath{decodePaths="); sb.append(Arrays.toString(this.c.toArray())); sb.append(UrlTreeKt.componentParamSuffixChar); return sb.toString(); } }