package ma;

import java.security.GeneralSecurityException;
import java.util.HashMap;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public final class r {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final r f30551b = new r();

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final HashMap f30552a = new HashMap();

    public final synchronized void a(String str, da.l lVar) {
        try {
            if (!this.f30552a.containsKey(str)) {
                this.f30552a.put(str, lVar);
                return;
            }
            if (((da.l) this.f30552a.get(str)).equals(lVar)) {
                return;
            }
            throw new GeneralSecurityException("Parameters object with name " + str + " already exists (" + this.f30552a.get(str) + "), cannot insert " + lVar);
        } catch (Throwable th) {
            throw th;
        }
    }

    public final synchronized void b(Map map) {
        for (Map.Entry entry : map.entrySet()) {
            a((String) entry.getKey(), (da.l) entry.getValue());
        }
    }
}
