.class public Lm2/a;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Ljava/lang/ClassLoader;

.field public final b:Lb2/d;


# direct methods
.method public constructor <init>(Lb2/d;)V
    .registers 2

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lm2/a;->b:Lb2/d;

    invoke-static {p0}, Lf3/g;->a(Ljava/lang/Object;)Ljava/lang/ClassLoader;

    move-result-object p1

    iput-object p1, p0, Lm2/a;->a:Ljava/lang/ClassLoader;

    return-void
.end method


# virtual methods
.method public a()V
    .registers 7

    iget-object v0, p0, Lm2/a;->b:Lb2/d;

    const-string v1, "logback.statusListenerClass"

    .line 1
    invoke-static {v1}, Le/c;->f(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Le/c;->h(Ljava/lang/String;)Z

    move-result v2

    const/4 v3, 0x0

    if-nez v2, :cond_38

    .line 2
    :try_start_f
    const-class v2, Ld3/f;

    invoke-static {v1, v2, v0}, Le/c;->g(Ljava/lang/String;Ljava/lang/Class;Ln2/e;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ld3/f;
    :try_end_17
    .catch Ljava/lang/Exception; {:try_start_f .. :try_end_17} :catch_18

    goto :goto_1d

    :catch_18
    move-exception v1

    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    move-object v1, v3

    :goto_1d
    if-eqz v1, :cond_38

    .line 3
    instance-of v2, v1, Lc3/c;

    if-eqz v2, :cond_29

    move-object v2, v1

    check-cast v2, Lc3/c;

    invoke-interface {v2, v0}, Lc3/c;->k(Ln2/e;)V

    :cond_29
    instance-of v2, v1, Lc3/e;

    if-eqz v2, :cond_33

    move-object v2, v1

    check-cast v2, Lc3/e;

    invoke-interface {v2}, Lc3/e;->start()V

    .line 4
    :cond_33
    iget-object v0, v0, Lb2/d;->t:Ln2/d;

    .line 5
    invoke-virtual {v0, v1}, Ln2/d;->b(Ld3/f;)V

    :cond_38
    const/4 v0, 0x0

    .line 6
    new-instance v1, Le2/a;

    invoke-direct {v1}, Le2/a;-><init>()V

    iget-object v2, p0, Lm2/a;->b:Lb2/d;

    invoke-virtual {v1, v2}, Lc3/d;->k(Ln2/e;)V

    const-string v2, "logback.configurationFile"

    .line 7
    invoke-static {v2}, Le/c;->f(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_98

    :try_start_4b
    new-instance v4, Ljava/io/File;

    invoke-direct {v4, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4}, Ljava/io/File;->exists()Z

    move-result v5

    if-eqz v5, :cond_68

    invoke-virtual {v4}, Ljava/io/File;->isFile()Z

    move-result v5

    if-eqz v5, :cond_68

    invoke-virtual {p0, v2, v2}, Lm2/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v4}, Ljava/io/File;->toURI()Ljava/net/URI;

    move-result-object v4

    invoke-virtual {v4}, Ljava/net/URI;->toURL()Ljava/net/URL;

    move-result-object v4

    goto :goto_6d

    :cond_68
    new-instance v4, Ljava/net/URL;

    invoke-direct {v4, v2}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
    :try_end_6d
    .catch Ljava/net/MalformedURLException; {:try_start_4b .. :try_end_6d} :catch_77
    .catchall {:try_start_4b .. :try_end_6d} :catchall_75

    :goto_6d
    if-eqz v4, :cond_70

    goto :goto_83

    :cond_70
    move-object v5, v3

    :goto_71
    invoke-virtual {p0, v2, v5}, Lm2/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_99

    :catchall_75
    move-exception v0

    goto :goto_94

    :catch_77
    :try_start_77
    iget-object v4, p0, Lm2/a;->a:Ljava/lang/ClassLoader;

    sget-boolean v5, Lf3/g;->a:Z
    :try_end_7b
    .catchall {:try_start_77 .. :try_end_7b} :catchall_75

    .line 8
    :try_start_7b
    invoke-virtual {v4, v2}, Ljava/lang/ClassLoader;->getResource(Ljava/lang/String;)Ljava/net/URL;

    move-result-object v4
    :try_end_7f
    .catchall {:try_start_7b .. :try_end_7f} :catchall_80

    goto :goto_81

    :catchall_80
    move-object v4, v3

    :goto_81
    if-eqz v4, :cond_88

    .line 9
    :goto_83
    invoke-virtual {v4}, Ljava/net/URL;->toString()Ljava/lang/String;

    move-result-object v5

    goto :goto_71

    :cond_88
    if-eqz v4, :cond_8f

    invoke-virtual {v4}, Ljava/net/URL;->toString()Ljava/lang/String;

    move-result-object v4

    goto :goto_90

    :cond_8f
    move-object v4, v3

    :goto_90
    invoke-virtual {p0, v2, v4}, Lm2/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_98

    :goto_94
    invoke-virtual {p0, v2, v3}, Lm2/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    throw v0

    :cond_98
    :goto_98
    move-object v4, v3

    :goto_99
    if-eqz v4, :cond_9f

    .line 10
    invoke-virtual {v1, v4}, Lt2/a;->F(Ljava/net/URL;)V

    const/4 v0, 0x1

    :cond_9f
    if-nez v0, :cond_b4

    .line 11
    iget-object v0, p0, Lm2/a;->a:Ljava/lang/ClassLoader;

    const-string v2, "assets/logback.xml"

    .line 12
    invoke-virtual {v0, v2}, Ljava/lang/ClassLoader;->getResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object v0

    if-eqz v0, :cond_ac

    move-object v3, v2

    :cond_ac
    invoke-virtual {p0, v2, v3}, Lm2/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    if-eqz v0, :cond_b4

    .line 13
    invoke-virtual {v1, v0}, Lt2/a;->E(Ljava/io/InputStream;)V

    :cond_b4
    return-void
.end method

.method public final b(Ljava/lang/String;Ljava/lang/String;)V
    .registers 8

    iget-object v0, p0, Lm2/a;->b:Lb2/d;

    .line 1
    iget-object v0, v0, Lb2/d;->t:Ln2/d;

    const-string v1, "]"

    if-nez p2, :cond_19

    .line 2
    new-instance p2, Ld3/b;

    const-string v2, "Could NOT find resource ["

    invoke-static {v2, p1, v1}, Le/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iget-object v1, p0, Lm2/a;->b:Lb2/d;

    invoke-direct {p2, p1, v1}, Ld3/b;-><init>(Ljava/lang/String;Ljava/lang/Object;)V

    invoke-virtual {v0, p2}, Ln2/d;->a(Ld3/d;)V

    goto :goto_3f

    :cond_19
    new-instance v2, Ld3/b;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Found resource ["

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "] at ["

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    iget-object p2, p0, Lm2/a;->b:Lb2/d;

    invoke-direct {v2, p1, p2}, Ld3/b;-><init>(Ljava/lang/String;Ljava/lang/Object;)V

    invoke-virtual {v0, v2}, Ln2/d;->a(Ld3/d;)V

    :goto_3f
    return-void
.end method
