package com.google.common.util.concurrent;

import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;
import p138.p176.p177.p242.p246.p251.C4303;
import p138.p176.p271.p273.AbstractC5102;
import p138.p176.p271.p273.C5107;
import p138.p176.p271.p273.ConcurrentMapC5117;

/* JADX INFO: loaded from: classes.dex */
@ThreadSafe
public class CycleDetectingLockFactory {

    public static final class PotentialDeadlockException extends C0339 {
        @Override // java.lang.Throwable
        public String getMessage() {
            return new StringBuilder(super.getMessage()).toString();
        }
    }

    /* JADX INFO: renamed from: com.google.common.util.concurrent.CycleDetectingLockFactory$֏, reason: contains not printable characters */
    public static class C0338 extends ThreadLocal<ArrayList<C0340>> {
        @Override // java.lang.ThreadLocal
        public ArrayList<C0340> initialValue() {
            return new ArrayList<>(3);
        }
    }

    /* JADX INFO: renamed from: com.google.common.util.concurrent.CycleDetectingLockFactory$ؠ, reason: contains not printable characters */
    public static class C0339 extends IllegalStateException {
        static {
            AbstractC5102.m8577(CycleDetectingLockFactory.class.getName(), C0339.class.getName(), C0340.class.getName());
        }
    }

    /* JADX INFO: renamed from: com.google.common.util.concurrent.CycleDetectingLockFactory$ހ, reason: contains not printable characters */
    public static class C0340 {
    }

    static {
        C5107 c5107 = new C5107();
        ConcurrentMapC5117.EnumC5145 enumC5145 = ConcurrentMapC5117.EnumC5145.f15366;
        boolean z = c5107.f15291 == null;
        Object[] objArr = {c5107.f15291};
        if (!z) {
            throw new IllegalStateException(C4303.m7022("Key strength was already set to %s", objArr));
        }
        if (enumC5145 == null) {
            throw null;
        }
        c5107.f15291 = enumC5145;
        if (!(enumC5145 != ConcurrentMapC5117.EnumC5145.f15365)) {
            throw new IllegalArgumentException("Soft keys are not supported");
        }
        if (enumC5145 != ConcurrentMapC5117.EnumC5145.f15364) {
            c5107.f15287 = true;
        }
        if (c5107.f15287) {
            new ConcurrentMapC5117(c5107);
        } else {
            int i = c5107.f15288;
            if (i == -1) {
                i = 16;
            }
            int i2 = c5107.f15289;
            if (i2 == -1) {
                i2 = 4;
            }
            new ConcurrentHashMap(i, 0.75f, i2);
        }
        Logger.getLogger(CycleDetectingLockFactory.class.getName());
        new C0338();
    }
}
