what-the-bank/sources/o/C13049fPG.java

53 lines
1.6 KiB
Java

package o;
import dagger.Lazy;
/* renamed from: o.fPG, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C13049fPG<T> implements fZE<T>, Lazy<T> {
private static final Object c = new Object();
private volatile fZE<T> a;
private volatile Object d = c;
private C13049fPG(fZE<T> fze) {
this.a = fze;
}
@Override // o.fZE
public final T get() {
T t = (T) this.d;
Object obj = c;
if (t == obj) {
synchronized (this) {
t = (T) this.d;
if (t == obj) {
t = this.a.get();
Object obj2 = this.d;
if (obj2 != obj && obj2 != t) {
StringBuilder sb = new StringBuilder("Scoped provider was invoked recursively returning different results: ");
sb.append(obj2);
sb.append(" & ");
sb.append(t);
sb.append(". This is likely due to a circular dependency.");
throw new IllegalStateException(sb.toString());
}
this.d = t;
this.a = null;
}
}
}
return t;
}
public static <P extends fZE<T>, T> fZE<T> a(P p) {
return p instanceof C13049fPG ? p : new C13049fPG(p);
}
public static <P extends fZE<T>, T> Lazy<T> e(P p) {
if (p instanceof Lazy) {
return (Lazy) p;
}
return new C13049fPG(p);
}
}