.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 ()V .registers 2 new-instance v0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$Companion;->(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 (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;->()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 5 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; filled-new-array {p1}, [Ljava/lang/Object; move-result-object p1 const/4 v2, 0x0 invoke-virtual {v1, v2, p1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; :try_end_11 .catch Ljava/lang/IllegalAccessException; {:try_start_7 .. :try_end_11} :catch_1d .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_7 .. :try_end_11} :catch_12 return-void :catch_12 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;->(Ljava/lang/String;Ljava/lang/Throwable;)V check-cast v1, Ljava/lang/Throwable; throw v1 :catch_1d 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;->(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 8 .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 .line 42 new-array v1, v1, [Ljava/lang/Class; iget-object v2, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->clientProviderClass:Ljava/lang/Class; const/4 v3, 0x0 aput-object v2, v1, v3 iget-object v2, p0, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;->serverProviderClass:Ljava/lang/Class; const/4 v3, 0x1 aput-object v2, v1, v3 new-instance v2, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider; invoke-direct {v2, p3}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->(Ljava/util/List;)V check-cast v2, Ljava/lang/reflect/InvocationHandler; .line 41 invoke-static {v0, v1, v2}, 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; filled-new-array {p1, p3}, [Ljava/lang/Object; move-result-object p1 const/4 p3, 0x0 invoke-virtual {v0, p3, p1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; :try_end_3a .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_12 .. :try_end_3a} :catch_46 .catch Ljava/lang/IllegalAccessException; {:try_start_12 .. :try_end_3a} :catch_3b return-void :catch_3b 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;->(Ljava/lang/String;Ljava/lang/Throwable;)V check-cast p3, Ljava/lang/Throwable; throw p3 :catch_46 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;->(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; filled-new-array {p1}, [Ljava/lang/Object; move-result-object p1 const/4 v2, 0x0 invoke-virtual {v1, v2, p1}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 invoke-static {p1}, Ljava/lang/reflect/Proxy;->getInvocationHandler(Ljava/lang/Object;)Ljava/lang/reflect/InvocationHandler; move-result-object p1 if-eqz p1, :cond_3d check-cast p1, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider; .line 64 invoke-virtual {p1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getUnsupported$okhttp()Z move-result v1 if-nez v1, :cond_31 invoke-virtual {p1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getSelected$okhttp()Ljava/lang/String; move-result-object v1 if-nez v1, :cond_31 .line 65 const-string v4, "ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?" const/4 v7, 0x6 const/4 v8, 0x0 const/4 v5, 0x0 const/4 v6, 0x0 move-object v3, p0 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 v2 .line 68 :cond_31 invoke-virtual {p1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getUnsupported$okhttp()Z move-result v1 if-eqz v1, :cond_38 goto :goto_3c :cond_38 invoke-virtual {p1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getSelected$okhttp()Ljava/lang/String; move-result-object v2 :goto_3c return-object v2 .line 63 :cond_3d 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;->(Ljava/lang/String;)V throw p1 :try_end_45 .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_7 .. :try_end_45} :catch_50 .catch Ljava/lang/IllegalAccessException; {:try_start_7 .. :try_end_45} :catch_45 :catch_45 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;->(Ljava/lang/String;Ljava/lang/Throwable;)V check-cast v1, Ljava/lang/Throwable; throw v1 :catch_50 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;->(Ljava/lang/String;Ljava/lang/Throwable;)V check-cast v1, Ljava/lang/Throwable; throw v1 .end method