apkfuckery/com.discord/smali_classes2/okhttp3/Headers$b.smali

420 lines
7.6 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public final Lokhttp3/Headers$b;
.super Ljava/lang/Object;
.source "Headers.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/Headers;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "b"
.end annotation
# direct methods
2020-07-08 16:44:49 +00:00
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2020-05-17 12:40:10 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final a(Ljava/lang/String;)V
.locals 7
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_5
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v3, 0x0
:goto_1
if-ge v3, v0, :cond_4
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v4
const/16 v5, 0x7e
const/16 v6, 0x21
if-le v6, v4, :cond_1
goto :goto_2
:cond_1
if-lt v5, v4, :cond_2
const/4 v5, 0x1
goto :goto_3
:cond_2
:goto_2
const/4 v5, 0x0
:goto_3
if-eqz v5, :cond_3
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v0, v2
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x2
aput-object p1, v0, v1
const-string p1, "Unexpected char %#04x at %d in header name: %s"
2020-07-23 01:06:17 +00:00
invoke-static {p1, v0}, Ln0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
move-result-object p1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_4
return-void
:cond_5
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "name is empty"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
2020-07-08 16:44:49 +00:00
.method public final b(Ljava/lang/String;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
.locals 7
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_4
invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C
move-result v3
const/16 v4, 0x9
const/4 v5, 0x1
if-eq v3, v4, :cond_2
const/16 v4, 0x7e
const/16 v6, 0x20
if-le v6, v3, :cond_0
goto :goto_1
:cond_0
if-lt v4, v3, :cond_1
goto :goto_2
:cond_1
:goto_1
const/4 v4, 0x0
goto :goto_3
:cond_2
:goto_2
const/4 v4, 0x1
:goto_3
if-eqz v4, :cond_3
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v0, v1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v5
const/4 v1, 0x2
aput-object p2, v0, v1
const/4 p2, 0x3
aput-object p1, v0, p2
const-string p1, "Unexpected char %#04x at %d in %s value: %s"
2020-07-23 01:06:17 +00:00
invoke-static {p1, v0}, Ln0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_4
return-void
.end method
2020-07-08 16:44:49 +00:00
.method public final varargs c([Ljava/lang/String;)Lokhttp3/Headers;
.locals 7
const/4 v0, 0x0
if-eqz p1, :cond_9
array-length v1, p1
const/4 v2, 0x2
rem-int/2addr v1, v2
const/4 v3, 0x1
const/4 v4, 0x0
if-nez v1, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_8
invoke-virtual {p1}, Ljava/lang/Object;->clone()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_7
check-cast p1, [Ljava/lang/String;
array-length v1, p1
const/4 v5, 0x0
:goto_1
if-ge v5, v1, :cond_4
aget-object v6, p1, v5
if-eqz v6, :cond_1
const/4 v6, 0x1
goto :goto_2
:cond_1
const/4 v6, 0x0
:goto_2
if-eqz v6, :cond_3
aget-object v6, p1, v5
if-eqz v6, :cond_2
2020-07-25 00:57:58 +00:00
invoke-static {v6}, Lj0/t/p;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
2020-07-08 16:44:49 +00:00
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v6
aput-object v6, p1, v5
add-int/lit8 v5, v5, 0x1
goto :goto_1
:cond_2
new-instance p1, Lkotlin/TypeCastException;
const-string v0, "null cannot be cast to non-null type kotlin.CharSequence"
invoke-direct {p1, v0}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p1
:cond_3
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Headers cannot be null"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_4
array-length v1, p1
2020-07-25 00:57:58 +00:00
invoke-static {v4, v1}, Lj0/q/f;->until(II)Lkotlin/ranges/IntRange;
2020-07-08 16:44:49 +00:00
move-result-object v1
2020-07-25 00:57:58 +00:00
invoke-static {v1, v2}, Lj0/q/f;->step(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
2020-07-08 16:44:49 +00:00
move-result-object v1
iget v2, v1, Lkotlin/ranges/IntProgression;->d:I
iget v3, v1, Lkotlin/ranges/IntProgression;->e:I
iget v1, v1, Lkotlin/ranges/IntProgression;->f:I
if-ltz v1, :cond_5
if-gt v2, v3, :cond_6
goto :goto_3
:cond_5
if-lt v2, v3, :cond_6
:goto_3
aget-object v4, p1, v2
add-int/lit8 v5, v2, 0x1
aget-object v5, p1, v5
invoke-virtual {p0, v4}, Lokhttp3/Headers$b;->a(Ljava/lang/String;)V
invoke-virtual {p0, v5, v4}, Lokhttp3/Headers$b;->b(Ljava/lang/String;Ljava/lang/String;)V
if-eq v2, v3, :cond_6
add-int/2addr v2, v1
goto :goto_3
:cond_6
new-instance v1, Lokhttp3/Headers;
invoke-direct {v1, p1, v0}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
return-object v1
:cond_7
new-instance p1, Lkotlin/TypeCastException;
const-string v0, "null cannot be cast to non-null type kotlin.Array<kotlin.String>"
invoke-direct {p1, v0}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p1
:cond_8
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Expected alternating header names and values"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_9
const-string p1, "namesAndValues"
2020-07-25 00:57:58 +00:00
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
throw v0
.end method