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

415 lines
7.6 KiB
Smali
Raw Normal View History

2020-11-12 02:11:44 +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
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.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-11-14 03:19:56 +00:00
invoke-static {p1, v0}, Lc0/g0/c;->j(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-11-12 02:11:44 +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
.method public final b(Ljava/lang/String;Ljava/lang/String;)V
.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-11-14 03:19:56 +00:00
invoke-static {p1, v0}, Lc0/g0/c;->j(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-11-12 02:11:44 +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
.method public final varargs c([Ljava/lang/String;)Lokhttp3/Headers;
.locals 6
const-string v0, "namesAndValues"
2020-11-14 03:19:56 +00:00
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
array-length v0, p1
const/4 v1, 0x2
rem-int/2addr v0, v1
const/4 v2, 0x1
const/4 v3, 0x0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :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 v0, p1
const/4 v4, 0x0
:goto_1
if-ge v4, v0, :cond_4
aget-object v5, p1, v4
if-eqz v5, :cond_1
const/4 v5, 0x1
goto :goto_2
:cond_1
const/4 v5, 0x0
:goto_2
if-eqz v5, :cond_3
aget-object v5, p1, v4
if-eqz v5, :cond_2
2020-11-14 03:19:56 +00:00
invoke-static {v5}, Ly/s/p;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
2020-11-12 02:11:44 +00:00
move-result-object v5
invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v5
aput-object v5, p1, v4
add-int/lit8 v4, v4, 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 v0, p1
2020-11-14 03:19:56 +00:00
invoke-static {v3, v0}, Ly/p/e;->until(II)Lkotlin/ranges/IntRange;
2020-11-12 02:11:44 +00:00
move-result-object v0
2020-11-14 03:19:56 +00:00
invoke-static {v0, v1}, Ly/p/e;->step(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
2020-11-12 02:11:44 +00:00
move-result-object v0
iget v1, v0, Lkotlin/ranges/IntProgression;->d:I
iget v2, v0, Lkotlin/ranges/IntProgression;->e:I
iget v0, v0, Lkotlin/ranges/IntProgression;->f:I
if-ltz v0, :cond_5
if-gt v1, v2, :cond_6
goto :goto_3
:cond_5
if-lt v1, v2, :cond_6
:goto_3
aget-object v3, p1, v1
add-int/lit8 v4, v1, 0x1
aget-object v4, p1, v4
invoke-virtual {p0, v3}, Lokhttp3/Headers$b;->a(Ljava/lang/String;)V
invoke-virtual {p0, v4, v3}, Lokhttp3/Headers$b;->b(Ljava/lang/String;Ljava/lang/String;)V
if-eq v1, v2, :cond_6
add-int/2addr v1, v0
goto :goto_3
:cond_6
new-instance v0, Lokhttp3/Headers;
const/4 v1, 0x0
invoke-direct {v0, p1, v1}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
return-object v0
: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
.end method