900 lines
18 KiB
Smali
900 lines
18 KiB
Smali
.class public final Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
.super Ljava/lang/Object;
|
|
.source "PublicSuffixDatabase.java"
|
|
|
|
|
|
# static fields
|
|
.field private static final EMPTY_RULE:[Ljava/lang/String;
|
|
|
|
.field private static final EXCEPTION_MARKER:B = 0x21t
|
|
|
|
.field private static final PREVAILING_RULE:[Ljava/lang/String;
|
|
|
|
.field public static final PUBLIC_SUFFIX_RESOURCE:Ljava/lang/String; = "publicsuffixes.gz"
|
|
|
|
.field private static final WILDCARD_LABEL:[B
|
|
|
|
.field private static final instance:Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
|
|
|
|
# instance fields
|
|
.field private final listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field private publicSuffixExceptionListBytes:[B
|
|
|
|
.field private publicSuffixListBytes:[B
|
|
|
|
.field private final readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
new-array v0, v0, [B
|
|
|
|
const/16 v1, 0x2a
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-byte v1, v0, v2
|
|
|
|
.line 38
|
|
sput-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->WILDCARD_LABEL:[B
|
|
|
|
new-array v0, v2, [Ljava/lang/String;
|
|
|
|
.line 39
|
|
sput-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->EMPTY_RULE:[Ljava/lang/String;
|
|
|
|
const-string v0, "*"
|
|
|
|
.line 40
|
|
filled-new-array {v0}, [Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->PREVAILING_RULE:[Ljava/lang/String;
|
|
|
|
.line 44
|
|
new-instance v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;-><init>()V
|
|
|
|
sput-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->instance:Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 35
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 47
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.line 50
|
|
new-instance v0, Ljava/util/concurrent/CountDownLatch;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static binarySearchBytes([B[[BI)Ljava/lang/String;
|
|
.locals 17
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
.line 195
|
|
array-length v2, v0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
move v4, v3
|
|
|
|
:goto_0
|
|
if-ge v4, v2, :cond_c
|
|
|
|
add-int v5, v4, v2
|
|
|
|
.line 198
|
|
div-int/lit8 v5, v5, 0x2
|
|
|
|
:goto_1
|
|
const/16 v6, 0xa
|
|
|
|
const/4 v7, -0x1
|
|
|
|
if-le v5, v7, :cond_0
|
|
|
|
.line 201
|
|
aget-byte v8, v0, v5
|
|
|
|
if-eq v8, v6, :cond_0
|
|
|
|
add-int/lit8 v5, v5, -0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
const/4 v8, 0x1
|
|
|
|
move v9, v8
|
|
|
|
:goto_2
|
|
add-int v10, v5, v9
|
|
|
|
.line 208
|
|
aget-byte v11, v0, v10
|
|
|
|
if-eq v11, v6, :cond_1
|
|
|
|
add-int/lit8 v9, v9, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
sub-int v6, v10, v5
|
|
|
|
move/from16 v11, p2
|
|
|
|
move v9, v3
|
|
|
|
move v12, v9
|
|
|
|
move v13, v12
|
|
|
|
:goto_3
|
|
if-eqz v9, :cond_2
|
|
|
|
const/16 v9, 0x2e
|
|
|
|
move v14, v3
|
|
|
|
goto :goto_4
|
|
|
|
.line 227
|
|
:cond_2
|
|
aget-object v14, v1, v11
|
|
|
|
aget-byte v14, v14, v12
|
|
|
|
and-int/lit16 v14, v14, 0xff
|
|
|
|
move/from16 v16, v14
|
|
|
|
move v14, v9
|
|
|
|
move/from16 v9, v16
|
|
|
|
:goto_4
|
|
add-int v15, v5, v13
|
|
|
|
.line 230
|
|
aget-byte v15, v0, v15
|
|
|
|
and-int/lit16 v15, v15, 0xff
|
|
|
|
sub-int/2addr v9, v15
|
|
|
|
if-eqz v9, :cond_3
|
|
|
|
goto :goto_5
|
|
|
|
:cond_3
|
|
add-int/lit8 v13, v13, 0x1
|
|
|
|
add-int/lit8 v12, v12, 0x1
|
|
|
|
if-ne v13, v6, :cond_4
|
|
|
|
goto :goto_5
|
|
|
|
.line 239
|
|
:cond_4
|
|
aget-object v15, v1, v11
|
|
|
|
array-length v15, v15
|
|
|
|
if-ne v15, v12, :cond_b
|
|
|
|
.line 242
|
|
array-length v14, v1
|
|
|
|
sub-int/2addr v14, v8
|
|
|
|
if-ne v11, v14, :cond_a
|
|
|
|
:goto_5
|
|
if-gez v9, :cond_5
|
|
|
|
:goto_6
|
|
add-int/lit8 v5, v5, -0x1
|
|
|
|
move v2, v5
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
if-lez v9, :cond_6
|
|
|
|
:goto_7
|
|
add-int/lit8 v4, v10, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
sub-int v7, v6, v13
|
|
|
|
.line 259
|
|
aget-object v8, v1, v11
|
|
|
|
array-length v8, v8
|
|
|
|
sub-int/2addr v8, v12
|
|
|
|
:goto_8
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
.line 260
|
|
array-length v9, v1
|
|
|
|
if-ge v11, v9, :cond_7
|
|
|
|
.line 261
|
|
aget-object v9, v1, v11
|
|
|
|
array-length v9, v9
|
|
|
|
add-int/2addr v8, v9
|
|
|
|
goto :goto_8
|
|
|
|
:cond_7
|
|
if-ge v8, v7, :cond_8
|
|
|
|
goto :goto_6
|
|
|
|
:cond_8
|
|
if-le v8, v7, :cond_9
|
|
|
|
goto :goto_7
|
|
|
|
.line 270
|
|
:cond_9
|
|
new-instance v1, Ljava/lang/String;
|
|
|
|
sget-object v2, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
invoke-direct {v1, v0, v5, v6, v2}, Ljava/lang/String;-><init>([BIILjava/nio/charset/Charset;)V
|
|
|
|
goto :goto_9
|
|
|
|
:cond_a
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
move v12, v7
|
|
|
|
move v9, v8
|
|
|
|
goto :goto_3
|
|
|
|
:cond_b
|
|
move v9, v14
|
|
|
|
goto :goto_3
|
|
|
|
:cond_c
|
|
const/4 v1, 0x0
|
|
|
|
:goto_9
|
|
return-object v1
|
|
.end method
|
|
|
|
.method private findMatchingRule([Ljava/lang/String;)[Ljava/lang/String;
|
|
.locals 8
|
|
|
|
.line 108
|
|
iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 109
|
|
invoke-direct {p0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readTheList()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 112
|
|
:cond_0
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->await()V
|
|
:try_end_0
|
|
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 117
|
|
:catch_0
|
|
:goto_0
|
|
monitor-enter p0
|
|
|
|
.line 118
|
|
:try_start_1
|
|
iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
.line 122
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 125
|
|
array-length v0, p1
|
|
|
|
new-array v3, v0, [[B
|
|
|
|
move v4, v1
|
|
|
|
.line 126
|
|
:goto_1
|
|
array-length v5, p1
|
|
|
|
if-ge v4, v5, :cond_1
|
|
|
|
.line 127
|
|
aget-object v5, p1, v4
|
|
|
|
sget-object v6, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move p1, v1
|
|
|
|
:goto_2
|
|
const/4 v4, 0x0
|
|
|
|
if-ge p1, v0, :cond_3
|
|
|
|
.line 134
|
|
iget-object v5, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
|
|
|
|
invoke-static {v5, v3, p1}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->binarySearchBytes([B[[BI)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
move-object v5, v4
|
|
|
|
:goto_3
|
|
if-le v0, v2, :cond_5
|
|
|
|
.line 148
|
|
invoke-virtual {v3}, [[B->clone()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, [[B
|
|
|
|
move v6, v1
|
|
|
|
.line 149
|
|
:goto_4
|
|
array-length v7, p1
|
|
|
|
sub-int/2addr v7, v2
|
|
|
|
if-ge v6, v7, :cond_5
|
|
|
|
.line 150
|
|
sget-object v7, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->WILDCARD_LABEL:[B
|
|
|
|
aput-object v7, p1, v6
|
|
|
|
.line 151
|
|
iget-object v7, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
|
|
|
|
invoke-static {v7, p1, v6}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->binarySearchBytes([B[[BI)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
if-eqz v7, :cond_4
|
|
|
|
goto :goto_5
|
|
|
|
:cond_4
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
move-object v7, v4
|
|
|
|
:goto_5
|
|
if-eqz v7, :cond_7
|
|
|
|
:goto_6
|
|
add-int/lit8 p1, v0, -0x1
|
|
|
|
if-ge v1, p1, :cond_7
|
|
|
|
.line 163
|
|
iget-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixExceptionListBytes:[B
|
|
|
|
invoke-static {p1, v3, v1}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->binarySearchBytes([B[[BI)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
move-object v4, p1
|
|
|
|
goto :goto_7
|
|
|
|
:cond_6
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
:goto_7
|
|
if-eqz v4, :cond_8
|
|
|
|
.line 174
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "!"
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "\\."
|
|
|
|
.line 175
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_8
|
|
if-nez v5, :cond_9
|
|
|
|
if-nez v7, :cond_9
|
|
|
|
.line 177
|
|
sget-object p1, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->PREVAILING_RULE:[Ljava/lang/String;
|
|
|
|
return-object p1
|
|
|
|
:cond_9
|
|
if-eqz v5, :cond_a
|
|
|
|
const-string p1, "\\."
|
|
|
|
.line 181
|
|
invoke-virtual {v5, p1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_8
|
|
|
|
.line 182
|
|
:cond_a
|
|
sget-object p1, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->EMPTY_RULE:[Ljava/lang/String;
|
|
|
|
:goto_8
|
|
if-eqz v7, :cond_b
|
|
|
|
const-string v0, "\\."
|
|
|
|
.line 185
|
|
invoke-virtual {v7, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_9
|
|
|
|
.line 186
|
|
:cond_b
|
|
sget-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->EMPTY_RULE:[Ljava/lang/String;
|
|
|
|
.line 188
|
|
:goto_9
|
|
array-length v1, p1
|
|
|
|
array-length v2, v0
|
|
|
|
if-le v1, v2, :cond_c
|
|
|
|
goto :goto_a
|
|
|
|
:cond_c
|
|
move-object p1, v0
|
|
|
|
:goto_a
|
|
return-object p1
|
|
|
|
.line 119
|
|
:cond_d
|
|
:try_start_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "Unable to load publicsuffixes.gz resource from the classpath."
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 122
|
|
monitor-exit p0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static get()Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
.locals 1
|
|
|
|
.line 60
|
|
sget-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->instance:Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private readTheList()V
|
|
.locals 6
|
|
|
|
.line 282
|
|
const-class v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "publicsuffixes.gz"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/ClassLoader;->getResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 286
|
|
new-instance v2, Lokio/GzipSource;
|
|
|
|
invoke-static {v0}, Lokio/Okio;->source(Ljava/io/InputStream;)Lokio/Source;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Lokio/GzipSource;-><init>(Lokio/Source;)V
|
|
|
|
invoke-static {v2}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
|
|
|
|
move-result-object v0
|
|
|
|
.line 288
|
|
:try_start_0
|
|
invoke-interface {v0}, Lokio/BufferedSource;->readInt()I
|
|
|
|
move-result v2
|
|
|
|
.line 289
|
|
new-array v2, v2, [B
|
|
|
|
.line 290
|
|
invoke-interface {v0, v2}, Lokio/BufferedSource;->readFully([B)V
|
|
|
|
.line 292
|
|
invoke-interface {v0}, Lokio/BufferedSource;->readInt()I
|
|
|
|
move-result v3
|
|
|
|
.line 293
|
|
new-array v3, v3, [B
|
|
|
|
.line 294
|
|
invoke-interface {v0, v3}, Lokio/BufferedSource;->readFully([B)V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 300
|
|
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
move-object v1, v2
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v2
|
|
|
|
.line 296
|
|
:try_start_1
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x5
|
|
|
|
const-string v5, "Failed to read public suffix list"
|
|
|
|
invoke-virtual {v3, v4, v5, v2}, Lokhttp3/internal/platform/Platform;->log(ILjava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 300
|
|
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
throw v1
|
|
|
|
:cond_0
|
|
:goto_1
|
|
move-object v3, v1
|
|
|
|
.line 304
|
|
:goto_2
|
|
monitor-enter p0
|
|
|
|
.line 305
|
|
:try_start_2
|
|
iput-object v1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
|
|
|
|
.line 306
|
|
iput-object v3, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixExceptionListBytes:[B
|
|
|
|
.line 307
|
|
monitor-exit p0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
.line 309
|
|
iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->countDown()V
|
|
|
|
return-void
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
.line 307
|
|
:try_start_3
|
|
monitor-exit p0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getEffectiveTldPlusOne(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
const-string v0, "domain == null"
|
|
|
|
.line 77
|
|
invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 80
|
|
invoke-static {p1}, Ljava/net/IDN;->toUnicode(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "\\."
|
|
|
|
.line 81
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 82
|
|
invoke-direct {p0, v0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->findMatchingRule([Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 83
|
|
array-length v3, v0
|
|
|
|
array-length v4, v2
|
|
|
|
const/16 v5, 0x21
|
|
|
|
const/4 v6, 0x0
|
|
|
|
if-ne v3, v4, :cond_0
|
|
|
|
aget-object v3, v2, v6
|
|
|
|
invoke-virtual {v3, v6}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v3
|
|
|
|
if-eq v3, v5, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
.line 89
|
|
:cond_0
|
|
aget-object v3, v2, v6
|
|
|
|
invoke-virtual {v3, v6}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v3
|
|
|
|
if-ne v3, v5, :cond_1
|
|
|
|
.line 91
|
|
array-length v0, v0
|
|
|
|
array-length v2, v2
|
|
|
|
goto :goto_0
|
|
|
|
.line 94
|
|
:cond_1
|
|
array-length v0, v0
|
|
|
|
array-length v2, v2
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
:goto_0
|
|
sub-int/2addr v0, v2
|
|
|
|
.line 97
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
.line 98
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 99
|
|
:goto_1
|
|
array-length v1, p1
|
|
|
|
if-ge v0, v1, :cond_2
|
|
|
|
.line 100
|
|
aget-object v1, p1, v0
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const/16 v3, 0x2e
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.line 102
|
|
:cond_2
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->length()I
|
|
|
|
move-result p1
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->deleteCharAt(I)Ljava/lang/StringBuilder;
|
|
|
|
.line 104
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method setListBytes([B[B)V
|
|
.locals 0
|
|
|
|
.line 314
|
|
iput-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
|
|
|
|
.line 315
|
|
iput-object p2, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixExceptionListBytes:[B
|
|
|
|
.line 316
|
|
iget-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
|
|
|
|
.line 317
|
|
iget-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/CountDownLatch;->countDown()V
|
|
|
|
return-void
|
|
.end method
|