PublicSuffixDatabase.smali 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. .class public final Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # static fields
  5. .field private static final EMPTY_RULE:[Ljava/lang/String;
  6. .field private static final EXCEPTION_MARKER:B = 0x21t
  7. .field private static final PREVAILING_RULE:[Ljava/lang/String;
  8. .field public static final PUBLIC_SUFFIX_RESOURCE:Ljava/lang/String; = "publicsuffixes.gz"
  9. .field private static final WILDCARD_LABEL:[B
  10. .field private static final instance:Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  11. # instance fields
  12. .field private final listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
  13. .field private publicSuffixExceptionListBytes:[B
  14. .field private publicSuffixListBytes:[B
  15. .field private final readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
  16. # direct methods
  17. .method static constructor <clinit>()V
  18. .locals 4
  19. const/4 v0, 0x1
  20. new-array v1, v0, [B
  21. const/4 v2, 0x0
  22. const/16 v3, 0x2a
  23. aput-byte v3, v1, v2
  24. sput-object v1, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->WILDCARD_LABEL:[B
  25. new-array v1, v2, [Ljava/lang/String;
  26. sput-object v1, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->EMPTY_RULE:[Ljava/lang/String;
  27. new-array v0, v0, [Ljava/lang/String;
  28. const-string v1, "*"
  29. aput-object v1, v0, v2
  30. sput-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->PREVAILING_RULE:[Ljava/lang/String;
  31. new-instance v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  32. invoke-direct {v0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;-><init>()V
  33. sput-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->instance:Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  34. return-void
  35. .end method
  36. .method public constructor <init>()V
  37. .locals 2
  38. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  39. new-instance v0, Ljava/util/concurrent/atomic/AtomicBoolean;
  40. const/4 v1, 0x0
  41. invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
  42. iput-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
  43. new-instance v0, Ljava/util/concurrent/CountDownLatch;
  44. const/4 v1, 0x1
  45. invoke-direct {v0, v1}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
  46. iput-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
  47. return-void
  48. .end method
  49. .method private static binarySearchBytes([B[[BI)Ljava/lang/String;
  50. .locals 16
  51. move-object/from16 v0, p0
  52. move-object/from16 v1, p1
  53. array-length v2, v0
  54. const/4 v3, 0x0
  55. move v4, v2
  56. const/4 v2, 0x0
  57. :goto_0
  58. if-ge v2, v4, :cond_c
  59. add-int v5, v2, v4
  60. div-int/lit8 v5, v5, 0x2
  61. :goto_1
  62. const/16 v6, 0xa
  63. const/4 v7, -0x1
  64. if-le v5, v7, :cond_0
  65. aget-byte v8, v0, v5
  66. if-eq v8, v6, :cond_0
  67. add-int/lit8 v5, v5, -0x1
  68. goto :goto_1
  69. :cond_0
  70. add-int/lit8 v5, v5, 0x1
  71. const/4 v8, 0x1
  72. const/4 v9, 0x1
  73. :goto_2
  74. add-int v10, v5, v9
  75. aget-byte v11, v0, v10
  76. if-eq v11, v6, :cond_1
  77. add-int/lit8 v9, v9, 0x1
  78. goto :goto_2
  79. :cond_1
  80. sub-int v6, v10, v5
  81. move/from16 v11, p2
  82. const/4 v9, 0x0
  83. const/4 v12, 0x0
  84. const/4 v13, 0x0
  85. :cond_2
  86. :goto_3
  87. if-eqz v9, :cond_3
  88. const/16 v9, 0x2e
  89. const/4 v9, 0x0
  90. const/16 v14, 0x2e
  91. goto :goto_4
  92. :cond_3
  93. aget-object v14, v1, v11
  94. aget-byte v14, v14, v12
  95. and-int/lit16 v14, v14, 0xff
  96. :goto_4
  97. add-int v15, v5, v13
  98. aget-byte v15, v0, v15
  99. and-int/lit16 v15, v15, 0xff
  100. sub-int/2addr v14, v15
  101. if-eqz v14, :cond_4
  102. goto :goto_5
  103. :cond_4
  104. add-int/lit8 v13, v13, 0x1
  105. add-int/lit8 v12, v12, 0x1
  106. if-ne v13, v6, :cond_5
  107. goto :goto_5
  108. :cond_5
  109. aget-object v15, v1, v11
  110. array-length v15, v15
  111. if-ne v15, v12, :cond_2
  112. array-length v9, v1
  113. sub-int/2addr v9, v8
  114. if-ne v11, v9, :cond_b
  115. :goto_5
  116. if-gez v14, :cond_6
  117. :goto_6
  118. add-int/lit8 v5, v5, -0x1
  119. move v4, v5
  120. goto :goto_0
  121. :cond_6
  122. if-lez v14, :cond_7
  123. :goto_7
  124. add-int/lit8 v10, v10, 0x1
  125. move v2, v10
  126. goto :goto_0
  127. :cond_7
  128. sub-int v7, v6, v13
  129. aget-object v8, v1, v11
  130. array-length v8, v8
  131. sub-int/2addr v8, v12
  132. :goto_8
  133. add-int/lit8 v11, v11, 0x1
  134. array-length v9, v1
  135. if-ge v11, v9, :cond_8
  136. aget-object v9, v1, v11
  137. array-length v9, v9
  138. add-int/2addr v8, v9
  139. goto :goto_8
  140. :cond_8
  141. if-ge v8, v7, :cond_9
  142. goto :goto_6
  143. :cond_9
  144. if-le v8, v7, :cond_a
  145. goto :goto_7
  146. :cond_a
  147. new-instance v1, Ljava/lang/String;
  148. sget-object v2, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
  149. invoke-direct {v1, v0, v5, v6, v2}, Ljava/lang/String;-><init>([BIILjava/nio/charset/Charset;)V
  150. goto :goto_9
  151. :cond_b
  152. add-int/lit8 v11, v11, 0x1
  153. const/4 v9, 0x1
  154. const/4 v12, -0x1
  155. goto :goto_3
  156. :cond_c
  157. const/4 v1, 0x0
  158. :goto_9
  159. return-object v1
  160. .end method
  161. .method private findMatchingRule([Ljava/lang/String;)[Ljava/lang/String;
  162. .locals 7
  163. iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
  164. invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
  165. move-result v0
  166. const/4 v1, 0x0
  167. const/4 v2, 0x1
  168. if-nez v0, :cond_0
  169. iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
  170. invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
  171. move-result v0
  172. if-eqz v0, :cond_0
  173. invoke-direct {p0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readTheListUninterruptibly()V
  174. goto :goto_0
  175. :cond_0
  176. :try_start_0
  177. iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
  178. invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->await()V
  179. :try_end_0
  180. .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
  181. :catch_0
  182. :goto_0
  183. monitor-enter p0
  184. :try_start_1
  185. iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
  186. if-eqz v0, :cond_d
  187. monitor-exit p0
  188. :try_end_1
  189. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  190. array-length v0, p1
  191. new-array v0, v0, [[B
  192. const/4 v3, 0x0
  193. :goto_1
  194. array-length v4, p1
  195. if-ge v3, v4, :cond_1
  196. aget-object v4, p1, v3
  197. sget-object v5, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
  198. invoke-virtual {v4, v5}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
  199. move-result-object v4
  200. aput-object v4, v0, v3
  201. add-int/lit8 v3, v3, 0x1
  202. goto :goto_1
  203. :cond_1
  204. const/4 p1, 0x0
  205. :goto_2
  206. array-length v3, v0
  207. const/4 v4, 0x0
  208. if-ge p1, v3, :cond_3
  209. iget-object v3, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
  210. invoke-static {v3, v0, p1}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->binarySearchBytes([B[[BI)Ljava/lang/String;
  211. move-result-object v3
  212. if-eqz v3, :cond_2
  213. goto :goto_3
  214. :cond_2
  215. add-int/lit8 p1, p1, 0x1
  216. goto :goto_2
  217. :cond_3
  218. move-object v3, v4
  219. :goto_3
  220. array-length p1, v0
  221. if-le p1, v2, :cond_5
  222. invoke-virtual {v0}, [[B->clone()Ljava/lang/Object;
  223. move-result-object p1
  224. check-cast p1, [[B
  225. const/4 v5, 0x0
  226. :goto_4
  227. array-length v6, p1
  228. sub-int/2addr v6, v2
  229. if-ge v5, v6, :cond_5
  230. sget-object v6, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->WILDCARD_LABEL:[B
  231. aput-object v6, p1, v5
  232. iget-object v6, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
  233. invoke-static {v6, p1, v5}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->binarySearchBytes([B[[BI)Ljava/lang/String;
  234. move-result-object v6
  235. if-eqz v6, :cond_4
  236. goto :goto_5
  237. :cond_4
  238. add-int/lit8 v5, v5, 0x1
  239. goto :goto_4
  240. :cond_5
  241. move-object v6, v4
  242. :goto_5
  243. if-eqz v6, :cond_7
  244. :goto_6
  245. array-length p1, v0
  246. sub-int/2addr p1, v2
  247. if-ge v1, p1, :cond_7
  248. iget-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixExceptionListBytes:[B
  249. invoke-static {p1, v0, v1}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->binarySearchBytes([B[[BI)Ljava/lang/String;
  250. move-result-object p1
  251. if-eqz p1, :cond_6
  252. goto :goto_7
  253. :cond_6
  254. add-int/lit8 v1, v1, 0x1
  255. goto :goto_6
  256. :cond_7
  257. move-object p1, v4
  258. :goto_7
  259. if-eqz p1, :cond_8
  260. new-instance v0, Ljava/lang/StringBuilder;
  261. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  262. const-string v1, "!"
  263. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  264. invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  265. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  266. move-result-object p1
  267. const-string v0, "\\."
  268. invoke-virtual {p1, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
  269. move-result-object p1
  270. return-object p1
  271. :cond_8
  272. if-nez v3, :cond_9
  273. if-nez v6, :cond_9
  274. sget-object p1, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->PREVAILING_RULE:[Ljava/lang/String;
  275. return-object p1
  276. :cond_9
  277. if-eqz v3, :cond_a
  278. const-string p1, "\\."
  279. invoke-virtual {v3, p1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
  280. move-result-object p1
  281. goto :goto_8
  282. :cond_a
  283. sget-object p1, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->EMPTY_RULE:[Ljava/lang/String;
  284. :goto_8
  285. if-eqz v6, :cond_b
  286. const-string v0, "\\."
  287. invoke-virtual {v6, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
  288. move-result-object v0
  289. goto :goto_9
  290. :cond_b
  291. sget-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->EMPTY_RULE:[Ljava/lang/String;
  292. :goto_9
  293. array-length v1, p1
  294. array-length v2, v0
  295. if-le v1, v2, :cond_c
  296. goto :goto_a
  297. :cond_c
  298. move-object p1, v0
  299. :goto_a
  300. return-object p1
  301. :cond_d
  302. :try_start_2
  303. new-instance p1, Ljava/lang/IllegalStateException;
  304. const-string v0, "Unable to load publicsuffixes.gz resource from the classpath."
  305. invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
  306. throw p1
  307. :catchall_0
  308. move-exception p1
  309. monitor-exit p0
  310. :try_end_2
  311. .catchall {:try_start_2 .. :try_end_2} :catchall_0
  312. goto :goto_c
  313. :goto_b
  314. throw p1
  315. :goto_c
  316. goto :goto_b
  317. .end method
  318. .method public static get()Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  319. .locals 1
  320. sget-object v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->instance:Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  321. return-object v0
  322. .end method
  323. .method private readTheList()V
  324. .locals 3
  325. .annotation system Ldalvik/annotation/Throws;
  326. value = {
  327. Ljava/io/IOException;
  328. }
  329. .end annotation
  330. const-class v0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;
  331. const-string v1, "publicsuffixes.gz"
  332. invoke-virtual {v0, v1}, Ljava/lang/Class;->getResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream;
  333. move-result-object v0
  334. if-nez v0, :cond_0
  335. return-void
  336. :cond_0
  337. new-instance v1, Lokio/GzipSource;
  338. invoke-static {v0}, Lokio/Okio;->source(Ljava/io/InputStream;)Lokio/Source;
  339. move-result-object v0
  340. invoke-direct {v1, v0}, Lokio/GzipSource;-><init>(Lokio/Source;)V
  341. invoke-static {v1}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
  342. move-result-object v0
  343. :try_start_0
  344. invoke-interface {v0}, Lokio/BufferedSource;->readInt()I
  345. move-result v1
  346. new-array v1, v1, [B
  347. invoke-interface {v0, v1}, Lokio/BufferedSource;->readFully([B)V
  348. invoke-interface {v0}, Lokio/BufferedSource;->readInt()I
  349. move-result v2
  350. new-array v2, v2, [B
  351. invoke-interface {v0, v2}, Lokio/BufferedSource;->readFully([B)V
  352. :try_end_0
  353. .catchall {:try_start_0 .. :try_end_0} :catchall_1
  354. invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
  355. monitor-enter p0
  356. :try_start_1
  357. iput-object v1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
  358. iput-object v2, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixExceptionListBytes:[B
  359. monitor-exit p0
  360. :try_end_1
  361. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  362. iget-object v0, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
  363. invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->countDown()V
  364. return-void
  365. :catchall_0
  366. move-exception v0
  367. :try_start_2
  368. monitor-exit p0
  369. :try_end_2
  370. .catchall {:try_start_2 .. :try_end_2} :catchall_0
  371. throw v0
  372. :catchall_1
  373. move-exception v1
  374. invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
  375. throw v1
  376. .end method
  377. .method private readTheListUninterruptibly()V
  378. .locals 5
  379. const/4 v0, 0x0
  380. :goto_0
  381. :try_start_0
  382. invoke-direct {p0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readTheList()V
  383. :try_end_0
  384. .catch Ljava/io/InterruptedIOException; {:try_start_0 .. :try_end_0} :catch_1
  385. .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  386. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  387. if-eqz v0, :cond_0
  388. invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
  389. move-result-object v0
  390. invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V
  391. :cond_0
  392. return-void
  393. :catchall_0
  394. move-exception v1
  395. goto :goto_1
  396. :catch_0
  397. move-exception v1
  398. :try_start_1
  399. invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
  400. move-result-object v2
  401. const/4 v3, 0x5
  402. const-string v4, "Failed to read public suffix list"
  403. invoke-virtual {v2, v3, v4, v1}, Lokhttp3/internal/platform/Platform;->log(ILjava/lang/String;Ljava/lang/Throwable;)V
  404. :try_end_1
  405. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  406. if-eqz v0, :cond_1
  407. invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
  408. move-result-object v0
  409. invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V
  410. :cond_1
  411. return-void
  412. :goto_1
  413. if-eqz v0, :cond_2
  414. invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
  415. move-result-object v0
  416. invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V
  417. :cond_2
  418. throw v1
  419. :catch_1
  420. const/4 v0, 0x1
  421. goto :goto_0
  422. .end method
  423. # virtual methods
  424. .method public getEffectiveTldPlusOne(Ljava/lang/String;)Ljava/lang/String;
  425. .locals 7
  426. if-eqz p1, :cond_3
  427. invoke-static {p1}, Ljava/net/IDN;->toUnicode(Ljava/lang/String;)Ljava/lang/String;
  428. move-result-object v0
  429. const-string v1, "\\."
  430. invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
  431. move-result-object v0
  432. invoke-direct {p0, v0}, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->findMatchingRule([Ljava/lang/String;)[Ljava/lang/String;
  433. move-result-object v2
  434. array-length v3, v0
  435. array-length v4, v2
  436. const/16 v5, 0x21
  437. const/4 v6, 0x0
  438. if-ne v3, v4, :cond_0
  439. aget-object v3, v2, v6
  440. invoke-virtual {v3, v6}, Ljava/lang/String;->charAt(I)C
  441. move-result v3
  442. if-eq v3, v5, :cond_0
  443. const/4 p1, 0x0
  444. return-object p1
  445. :cond_0
  446. aget-object v3, v2, v6
  447. invoke-virtual {v3, v6}, Ljava/lang/String;->charAt(I)C
  448. move-result v3
  449. array-length v0, v0
  450. array-length v2, v2
  451. if-ne v3, v5, :cond_1
  452. goto :goto_0
  453. :cond_1
  454. add-int/lit8 v2, v2, 0x1
  455. :goto_0
  456. sub-int/2addr v0, v2
  457. new-instance v2, Ljava/lang/StringBuilder;
  458. invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
  459. invoke-virtual {p1, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
  460. move-result-object p1
  461. :goto_1
  462. array-length v1, p1
  463. if-ge v0, v1, :cond_2
  464. aget-object v1, p1, v0
  465. invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  466. const/16 v1, 0x2e
  467. invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  468. add-int/lit8 v0, v0, 0x1
  469. goto :goto_1
  470. :cond_2
  471. invoke-virtual {v2}, Ljava/lang/StringBuilder;->length()I
  472. move-result p1
  473. add-int/lit8 p1, p1, -0x1
  474. invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->deleteCharAt(I)Ljava/lang/StringBuilder;
  475. invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  476. move-result-object p1
  477. return-object p1
  478. :cond_3
  479. new-instance p1, Ljava/lang/NullPointerException;
  480. const-string v0, "domain == null"
  481. invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
  482. goto :goto_3
  483. :goto_2
  484. throw p1
  485. :goto_3
  486. goto :goto_2
  487. .end method
  488. .method setListBytes([B[B)V
  489. .locals 0
  490. iput-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixListBytes:[B
  491. iput-object p2, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->publicSuffixExceptionListBytes:[B
  492. iget-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->listRead:Ljava/util/concurrent/atomic/AtomicBoolean;
  493. const/4 p2, 0x1
  494. invoke-virtual {p1, p2}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
  495. iget-object p1, p0, Lokhttp3/internal/publicsuffix/PublicSuffixDatabase;->readCompleteLatch:Ljava/util/concurrent/CountDownLatch;
  496. invoke-virtual {p1}, Ljava/util/concurrent/CountDownLatch;->countDown()V
  497. return-void
  498. .end method