Jdk8WithJettyBootPlatform.smali
.class public final Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;
.super Lokhttp3/internal/platform/Platform;
.source "Jdk8WithJettyBootPlatform.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;,
Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0008\u0004\u0018\u0000 \u00162\u00020\u0001:\u0002\u0015\u0016B5\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003\u0012\n\u0010\u0006\u001a\u0006\u0012\u0002\u0008\u00030\u0007\u0012\n\u0010\u0008\u001a\u0006\u0012\u0002\u0008\u00030\u0007\u00a2\u0006\u0002\u0010\tJ\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\u000c\u001a\u00020\rH\u0016J(\u0010\u000e\u001a\u00020\u000b2\u0006\u0010\u000c\u001a\u00020\r2\u0008\u0010\u000f\u001a\u0004\u0018\u00010\u00102\u000c\u0010\u0011\u001a\u0008\u0012\u0004\u0012\u00020\u00130\u0012H\u0016J\u0012\u0010\u0014\u001a\u0004\u0018\u00010\u00102\u0006\u0010\u000c\u001a\u00020\rH\u0016R\u0012\u0010\u0006\u001a\u0006\u0012\u0002\u0008\u00030\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0012\u0010\u0008\u001a\u0006\u0012\u0002\u0008\u00030\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0017"
}
d2 = {
"Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;",
"Lokhttp3/internal/platform/Platform;",
"putMethod",
"Ljava/lang/reflect/Method;",
"getMethod",
"removeMethod",
"clientProviderClass",
"Ljava/lang/Class;",
"serverProviderClass",
"(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/Class;Ljava/lang/Class;)V",
"afterHandshake",
"",
"sslSocket",
"Ljavax/net/ssl/SSLSocket;",
"configureTlsExtensions",
"hostname",
"",
"protocols",
"",
"Lokhttp3/Protocol;",
"getSelectedProtocol",
"AlpnProvider",
"Companion",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x1,
0x10
}
.end annotation
# static fields
.field public static final Companion:Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;
# instance fields
.field private final clientProviderClass:Ljava/lang/Class;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Class<",
"*>;"
}
.end annotation
.end field
.field private final getMethod:Ljava/lang/reflect/Method;
.field private final putMethod:Ljava/lang/reflect/Method;
.field private final removeMethod:Ljava/lang/reflect/Method;
.field private final serverProviderClass:Ljava/lang/Class;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Class<",
"*>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 2
new-instance v0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->Companion:Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;
return-void
.end method
.method public constructor <init>(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/Class;Ljava/lang/Class;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/reflect/Method;",
"Ljava/lang/reflect/Method;",
"Ljava/lang/reflect/Method;",
"Ljava/lang/Class<",
"*>;",
"Ljava/lang/Class<",
"*>;)V"
}
.end annotation
const-string v0, "putMethod"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "getMethod"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "removeMethod"
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "clientProviderClass"
invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "serverProviderClass"
invoke-static {p5, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 32
invoke-direct {p0}, Lokhttp3/internal/platform/Platform;-><init>()V
iput-object p1, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->putMethod:Ljava/lang/reflect/Method;
iput-object p2, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->getMethod:Ljava/lang/reflect/Method;
iput-object p3, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->removeMethod:Ljava/lang/reflect/Method;
iput-object p4, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->clientProviderClass:Ljava/lang/Class;
iput-object p5, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->serverProviderClass:Ljava/lang/Class;
return-void
.end method
# virtual methods
.method public afterHandshake(Ljavax/net/ssl/SSLSocket;)V
.registers 7
const-string v0, "failed to remove ALPN"
const-string v1, "sslSocket"
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 53
:try_start_7
iget-object v1, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->removeMethod:Ljava/lang/reflect/Method;
const/4 v2, 0x0
const/4 v3, 0x1
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
aput-object p1, v3, v4
invoke-virtual {v1, v2, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_13
.catch Ljava/lang/IllegalAccessException; {:try_start_7 .. :try_end_13} :catch_1f
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_7 .. :try_end_13} :catch_14
return-void
:catch_14
move-exception p1
.line 57
new-instance v1, Ljava/lang/AssertionError;
check-cast p1, Ljava/lang/Throwable;
invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
:catch_1f
move-exception p1
.line 55
new-instance v1, Ljava/lang/AssertionError;
check-cast p1, Ljava/lang/Throwable;
invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
.end method
.method public configureTlsExtensions(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
.registers 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljavax/net/ssl/SSLSocket;",
"Ljava/lang/String;",
"Ljava/util/List<",
"+",
"Lokhttp3/Protocol;",
">;)V"
}
.end annotation
const-string p2, "failed to set ALPN"
const-string v0, "sslSocket"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "protocols"
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 38
sget-object v0, Lokhttp3/internal/platform/Platform;->Companion:Lokhttp3/internal/platform/Platform$Companion;
invoke-virtual {v0, p3}, Lokhttp3/internal/platform/Platform$Companion;->alpnProtocolNames(Ljava/util/List;)Ljava/util/List;
move-result-object p3
.line 41
:try_start_12
const-class v0, Lokhttp3/internal/platform/Platform;
invoke-virtual {v0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object v0
const/4 v1, 0x2
new-array v2, v1, [Ljava/lang/Class;
.line 42
iget-object v3, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->clientProviderClass:Ljava/lang/Class;
const/4 v4, 0x0
aput-object v3, v2, v4
iget-object v3, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->serverProviderClass:Ljava/lang/Class;
const/4 v5, 0x1
aput-object v3, v2, v5
new-instance v3, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;
invoke-direct {v3, p3}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;-><init>(Ljava/util/List;)V
check-cast v3, Ljava/lang/reflect/InvocationHandler;
.line 41
invoke-static {v0, v2, v3}, Ljava/lang/reflect/Proxy;->newProxyInstance(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;
move-result-object p3
.line 43
iget-object v0, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->putMethod:Ljava/lang/reflect/Method;
const/4 v2, 0x0
new-array v1, v1, [Ljava/lang/Object;
aput-object p1, v1, v4
aput-object p3, v1, v5
invoke-virtual {v0, v2, v1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
:try_end_3c
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_12 .. :try_end_3c} :catch_48
.catch Ljava/lang/IllegalAccessException; {:try_start_12 .. :try_end_3c} :catch_3d
return-void
:catch_3d
move-exception p1
.line 47
new-instance p3, Ljava/lang/AssertionError;
check-cast p1, Ljava/lang/Throwable;
invoke-direct {p3, p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast p3, Ljava/lang/Throwable;
throw p3
:catch_48
move-exception p1
.line 45
new-instance p3, Ljava/lang/AssertionError;
check-cast p1, Ljava/lang/Throwable;
invoke-direct {p3, p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast p3, Ljava/lang/Throwable;
throw p3
.end method
.method public getSelectedProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
.registers 11
const-string v0, "failed to get ALPN selected protocol"
const-string v1, "sslSocket"
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 63
:try_start_7
iget-object v1, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->getMethod:Ljava/lang/reflect/Method;
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object p1, v2, v3
const/4 p1, 0x0
invoke-virtual {v1, p1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
invoke-static {v1}, Ljava/lang/reflect/Proxy;->getInvocationHandler(Ljava/lang/Object;)Ljava/lang/reflect/InvocationHandler;
move-result-object v1
if-eqz v1, :cond_3f
check-cast v1, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;
.line 64
invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getUnsupported$okhttp()Z
move-result v2
if-nez v2, :cond_33
invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getSelected$okhttp()Ljava/lang/String;
move-result-object v2
if-nez v2, :cond_33
const-string v4, "ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?"
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x6
const/4 v8, 0x0
move-object v3, p0
.line 65
invoke-static/range {v3 .. v8}, Lokhttp3/internal/platform/Platform;->log$default(Lokhttp3/internal/platform/Platform;Ljava/lang/String;ILjava/lang/Throwable;ILjava/lang/Object;)V
return-object p1
.line 68
:cond_33
invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getUnsupported$okhttp()Z
move-result v2
if-eqz v2, :cond_3a
goto :goto_3e
:cond_3a
invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getSelected$okhttp()Ljava/lang/String;
move-result-object p1
:goto_3e
return-object p1
.line 63
:cond_3f
new-instance p1, Lkotlin/TypeCastException;
const-string v1, "null cannot be cast to non-null type okhttp3.internal.platform.Jdk8WithJettyBootPlatform.AlpnProvider"
invoke-direct {p1, v1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_47
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_7 .. :try_end_47} :catch_52
.catch Ljava/lang/IllegalAccessException; {:try_start_7 .. :try_end_47} :catch_47
:catch_47
move-exception p1
.line 72
new-instance v1, Ljava/lang/AssertionError;
check-cast p1, Ljava/lang/Throwable;
invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
:catch_52
move-exception p1
.line 70
new-instance v1, Ljava/lang/AssertionError;
check-cast p1, Ljava/lang/Throwable;
invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
.end method