.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 = {} d1 = { "\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0008\u0018\u0000 \u00182\u00020\u0001:\u0002\u0019\u0018B7\u0012\u0006\u0010\u000e\u001a\u00020\r\u0012\u0006\u0010\u0010\u001a\u00020\r\u0012\u0006\u0010\u0011\u001a\u00020\r\u0012\n\u0010\u0013\u001a\u0006\u0012\u0002\u0008\u00030\u0012\u0012\n\u0010\u0015\u001a\u0006\u0012\u0002\u0008\u00030\u0012\u00a2\u0006\u0004\u0008\u0016\u0010\u0017J(\u0010\n\u001a\u00020\t2\u0006\u0010\u0003\u001a\u00020\u00022\u0008\u0010\u0005\u001a\u0004\u0018\u00010\u00042\u000c\u0010\u0008\u001a\u0008\u0012\u0004\u0012\u00020\u00070\u0006H\u0016J\u0010\u0010\u000b\u001a\u00020\t2\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0012\u0010\u000c\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016R\u0014\u0010\u000e\u001a\u00020\r8\u0002X\u0082\u0004\u00a2\u0006\u0006\n\u0004\u0008\u000e\u0010\u000fR\u0014\u0010\u0010\u001a\u00020\r8\u0002X\u0082\u0004\u00a2\u0006\u0006\n\u0004\u0008\u0010\u0010\u000fR\u0014\u0010\u0011\u001a\u00020\r8\u0002X\u0082\u0004\u00a2\u0006\u0006\n\u0004\u0008\u0011\u0010\u000fR\u0018\u0010\u0013\u001a\u0006\u0012\u0002\u0008\u00030\u00128\u0002X\u0082\u0004\u00a2\u0006\u0006\n\u0004\u0008\u0013\u0010\u0014R\u0018\u0010\u0015\u001a\u0006\u0012\u0002\u0008\u00030\u00128\u0002X\u0082\u0004\u00a2\u0006\u0006\n\u0004\u0008\u0015\u0010\u0014\u00a8\u0006\u001a" } d2 = { "Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform;", "Lokhttp3/internal/platform/Platform;", "Ljavax/net/ssl/SSLSocket;", "sslSocket", "", "hostname", "", "Lokhttp3/Protocol;", "protocols", "Lkotlin/d1;", "configureTlsExtensions", "afterHandshake", "getSelectedProtocol", "Ljava/lang/reflect/Method;", "putMethod", "Ljava/lang/reflect/Method;", "getMethod", "removeMethod", "Ljava/lang/Class;", "clientProviderClass", "Ljava/lang/Class;", "serverProviderClass", "", "(Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;Ljava/lang/Class;Ljava/lang/Class;)V", "Companion", "AlpnProvider", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .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 public static constructor ()V .locals 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/u;)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 .locals 1 .param p1 # Ljava/lang/reflect/Method; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .param p2 # Ljava/lang/reflect/Method; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .param p3 # Ljava/lang/reflect/Method; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .param p4 # Ljava/lang/Class; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .param p5 # Ljava/lang/Class; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .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/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "getMethod" invoke-static {p2, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "removeMethod" invoke-static {p3, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "clientProviderClass" invoke-static {p4, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "serverProviderClass" invoke-static {p5, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V .line 1 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 .locals 5 .param p1 # Ljavax/net/ssl/SSLSocket; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param const-string v0, "failed to remove ALPN" const-string v1, "sslSocket" invoke-static {p1, v1}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V .line 1 :try_start_0 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_0 .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0 return-void :catch_0 move-exception p1 .line 2 new-instance v1, Ljava/lang/AssertionError; invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw v1 :catch_1 move-exception p1 .line 3 new-instance v1, Ljava/lang/AssertionError; invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw v1 .end method .method public configureTlsExtensions(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V .locals 6 .param p1 # Ljavax/net/ssl/SSLSocket; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .param p2 # Ljava/lang/String; .annotation build Lorg/jetbrains/annotations/Nullable; .end annotation .end param .param p3 # Ljava/util/List; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .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/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "protocols" invoke-static {p3, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V .line 1 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 2 :try_start_0 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 3 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;->(Ljava/util/List;)V .line 4 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 5 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_0 .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0 return-void :catch_0 move-exception p1 .line 6 new-instance p3, Ljava/lang/AssertionError; invoke-direct {p3, p2, p1}, Ljava/lang/AssertionError;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw p3 :catch_1 move-exception p1 .line 7 new-instance p3, Ljava/lang/AssertionError; invoke-direct {p3, p2, p1}, Ljava/lang/AssertionError;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw p3 .end method .method public getSelectedProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String; .locals 9 .param p1 # Ljavax/net/ssl/SSLSocket; .annotation build Lorg/jetbrains/annotations/NotNull; .end annotation .end param .annotation build Lorg/jetbrains/annotations/Nullable; .end annotation const-string v0, "failed to get ALPN selected protocol" const-string v1, "sslSocket" invoke-static {p1, v1}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V .line 1 :try_start_0 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_2 check-cast v1, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider; .line 2 invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getUnsupported()Z move-result v2 if-nez v2, :cond_0 invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getSelected()Ljava/lang/String; move-result-object v2 if-nez v2, :cond_0 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 3 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 4 :cond_0 invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getUnsupported()Z move-result v2 if-eqz v2, :cond_1 goto :goto_0 :cond_1 invoke-virtual {v1}, Lokhttp3/internal/platform/Jdk8WithJettyBootPlatform$AlpnProvider;->getSelected()Ljava/lang/String; move-result-object p1 :goto_0 return-object p1 .line 5 :cond_2 new-instance p1, Ljava/lang/NullPointerException; const-string v1, "null cannot be cast to non-null type okhttp3.internal.platform.Jdk8WithJettyBootPlatform.AlpnProvider" invoke-direct {p1, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 :try_end_0 .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0 :catch_0 move-exception p1 .line 6 new-instance v1, Ljava/lang/AssertionError; invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw v1 :catch_1 move-exception p1 .line 7 new-instance v1, Ljava/lang/AssertionError; invoke-direct {v1, v0, p1}, Ljava/lang/AssertionError;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw v1 .end method