mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 09:32:27 -06:00
148 lines
7.7 KiB
Java
148 lines
7.7 KiB
Java
package okhttp3;
|
|
|
|
import java.nio.charset.Charset;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.util.Collections;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.Locale;
|
|
import java.util.Map;
|
|
import kotlin.Deprecated;
|
|
import kotlin.DeprecationLevel;
|
|
import kotlin.Metadata;
|
|
import kotlin.ReplaceWith;
|
|
import kotlin.collections.MapsKt;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* compiled from: Challenge.kt */
|
|
@Metadata(bv = {1, 0, 3}, d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0005\u0018\u00002\u00020\u0001B\u0017\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003¢\u0006\u0002\u0010\u0005B#\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0014\u0010\u0006\u001a\u0010\u0012\u0006\u0012\u0004\u0018\u00010\u0003\u0012\u0004\u0012\u00020\u00030\u0007¢\u0006\u0002\u0010\bJ\u001b\u0010\u0006\u001a\u0010\u0012\u0006\u0012\u0004\u0018\u00010\u0003\u0012\u0004\u0012\u00020\u00030\u0007H\u0007¢\u0006\u0002\b\u000eJ\r\u0010\n\u001a\u00020\u000bH\u0007¢\u0006\u0002\b\u000fJ\u0013\u0010\u0010\u001a\u00020\u00112\b\u0010\u0012\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\b\u0010\u0013\u001a\u00020\u0014H\u0016J\u000f\u0010\u0004\u001a\u0004\u0018\u00010\u0003H\u0007¢\u0006\u0002\b\u0015J\r\u0010\u0002\u001a\u00020\u0003H\u0007¢\u0006\u0002\b\u0016J\b\u0010\u0017\u001a\u00020\u0003H\u0016J\u000e\u0010\u0018\u001a\u00020\u00002\u0006\u0010\n\u001a\u00020\u000bR!\u0010\u0006\u001a\u0010\u0012\u0006\u0012\u0004\u0018\u00010\u0003\u0012\u0004\u0012\u00020\u00030\u00078G¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\tR\u0011\u0010\n\u001a\u00020\u000b8G¢\u0006\u0006\u001a\u0004\b\n\u0010\fR\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u00038G¢\u0006\u0006\u001a\u0004\b\u0004\u0010\rR\u0013\u0010\u0002\u001a\u00020\u00038\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010\r¨\u0006\u0019"}, d2 = {"Lokhttp3/Challenge;", "", "scheme", "", "realm", "(Ljava/lang/String;Ljava/lang/String;)V", "authParams", "", "(Ljava/lang/String;Ljava/util/Map;)V", "()Ljava/util/Map;", "charset", "Ljava/nio/charset/Charset;", "()Ljava/nio/charset/Charset;", "()Ljava/lang/String;", "-deprecated_authParams", "-deprecated_charset", "equals", "", "other", "hashCode", "", "-deprecated_realm", "-deprecated_scheme", "toString", "withCharset", "okhttp"}, k = 1, mv = {1, 4, 0})
|
|
/* loaded from: classes3.dex */
|
|
public final class Challenge {
|
|
private final Map<String, String> authParams;
|
|
private final String scheme;
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "authParams", imports = {}))
|
|
/* renamed from: -deprecated_authParams, reason: not valid java name */
|
|
public final Map<String, String> m7292deprecated_authParams() {
|
|
return this.authParams;
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "scheme", imports = {}))
|
|
/* renamed from: -deprecated_scheme, reason: not valid java name and from getter */
|
|
public final String getScheme() {
|
|
return this.scheme;
|
|
}
|
|
|
|
public final Map<String, String> authParams() {
|
|
return this.authParams;
|
|
}
|
|
|
|
public final String scheme() {
|
|
return this.scheme;
|
|
}
|
|
|
|
public Challenge(String scheme, Map<String, String> authParams) {
|
|
String str;
|
|
Intrinsics.checkNotNullParameter(scheme, "scheme");
|
|
Intrinsics.checkNotNullParameter(authParams, "authParams");
|
|
this.scheme = scheme;
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
|
for (Map.Entry<String, String> entry : authParams.entrySet()) {
|
|
String key = entry.getKey();
|
|
String value = entry.getValue();
|
|
if (key != null) {
|
|
Locale US = Locale.US;
|
|
Intrinsics.checkNotNullExpressionValue(US, "US");
|
|
if (key == null) {
|
|
throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
|
|
}
|
|
str = key.toLowerCase(US);
|
|
Intrinsics.checkNotNullExpressionValue(str, "(this as java.lang.String).toLowerCase(locale)");
|
|
} else {
|
|
str = null;
|
|
}
|
|
linkedHashMap.put(str, value);
|
|
}
|
|
Map<String, String> unmodifiableMap = Collections.unmodifiableMap(linkedHashMap);
|
|
Intrinsics.checkNotNullExpressionValue(unmodifiableMap, "unmodifiableMap<String?, String>(newAuthParams)");
|
|
this.authParams = unmodifiableMap;
|
|
}
|
|
|
|
public final String realm() {
|
|
return this.authParams.get("realm");
|
|
}
|
|
|
|
public final Charset charset() {
|
|
String str = this.authParams.get("charset");
|
|
if (str != null) {
|
|
try {
|
|
Charset forName = Charset.forName(str);
|
|
Intrinsics.checkNotNullExpressionValue(forName, "Charset.forName(charset)");
|
|
return forName;
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
Charset ISO_8859_1 = StandardCharsets.ISO_8859_1;
|
|
Intrinsics.checkNotNullExpressionValue(ISO_8859_1, "ISO_8859_1");
|
|
return ISO_8859_1;
|
|
}
|
|
|
|
/* JADX WARN: Illegal instructions before constructor call */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public Challenge(java.lang.String r2, java.lang.String r3) {
|
|
/*
|
|
r1 = this;
|
|
java.lang.String r0 = "scheme"
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r2, r0)
|
|
java.lang.String r0 = "realm"
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r3, r0)
|
|
java.util.Map r3 = java.util.Collections.singletonMap(r0, r3)
|
|
java.lang.String r0 = "singletonMap(\"realm\", realm)"
|
|
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r3, r0)
|
|
r1.<init>(r2, r3)
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: okhttp3.Challenge.<init>(java.lang.String, java.lang.String):void");
|
|
}
|
|
|
|
public final Challenge withCharset(Charset charset) {
|
|
Intrinsics.checkNotNullParameter(charset, "charset");
|
|
Map mutableMap = MapsKt.toMutableMap(this.authParams);
|
|
String name = charset.name();
|
|
Intrinsics.checkNotNullExpressionValue(name, "charset.name()");
|
|
mutableMap.put("charset", name);
|
|
return new Challenge(this.scheme, (Map<String, String>) mutableMap);
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "realm", imports = {}))
|
|
/* renamed from: -deprecated_realm, reason: not valid java name */
|
|
public final String m7294deprecated_realm() {
|
|
return realm();
|
|
}
|
|
|
|
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "charset", imports = {}))
|
|
/* renamed from: -deprecated_charset, reason: not valid java name */
|
|
public final Charset m7293deprecated_charset() {
|
|
return charset();
|
|
}
|
|
|
|
public boolean equals(Object other) {
|
|
if (other instanceof Challenge) {
|
|
Challenge challenge = (Challenge) other;
|
|
if (Intrinsics.areEqual(challenge.scheme, this.scheme) && Intrinsics.areEqual(challenge.authParams, this.authParams)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return ((899 + this.scheme.hashCode()) * 31) + this.authParams.hashCode();
|
|
}
|
|
|
|
public String toString() {
|
|
return this.scheme + " authParams=" + this.authParams;
|
|
}
|
|
}
|