This repository was archived by the owner on Apr 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/src/main/java/acr/browser/lightning/adblock Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ import acr.browser.lightning.di.MainScheduler
18
18
import acr.browser.lightning.extensions.toast
19
19
import acr.browser.lightning.log.Logger
20
20
import android.app.Application
21
+ import android.net.Uri
21
22
import io.reactivex.Maybe
22
23
import io.reactivex.Scheduler
23
24
import io.reactivex.Single
24
25
import io.reactivex.disposables.CompositeDisposable
25
26
import io.reactivex.rxkotlin.plusAssign
26
27
import io.reactivex.rxkotlin.subscribeBy
27
- import java.net.URI
28
28
import java.net.URISyntaxException
29
29
import javax.inject.Inject
30
30
import javax.inject.Singleton
@@ -155,7 +155,7 @@ class BloomFilterAdBlocker @Inject constructor(
155
155
* Extract the [Host] from a [String] representing a URL. Returns null if no host was extracted.
156
156
*/
157
157
private fun String.host (): Host ? = try {
158
- URI (this ).host?.let (::Host )
158
+ Uri .parse (this ).host?.let (::Host )
159
159
} catch (exception: URISyntaxException ) {
160
160
logger.log(TAG , " Invalid URL: $this " , exception)
161
161
null
You can’t perform that action at this time.
0 commit comments