diff options
| author | David Göransson <david.goransson@mullvad.net> | 2024-10-02 12:02:13 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2024-10-03 08:52:02 +0200 |
| commit | ef4cb238c10eb99c813763aa2a15e9e3e778b690 (patch) | |
| tree | 765427cfd898c41ddecfb4e69a15a7635af47924 /android/test | |
| parent | 029895582400827c4fe17ade882dd62bfd90f077 (diff) | |
| download | mullvadvpn-ef4cb238c10eb99c813763aa2a15e9e3e778b690.tar.xz mullvadvpn-ef4cb238c10eb99c813763aa2a15e9e3e778b690.zip | |
Suppress unchecked cast for test
Diffstat (limited to 'android/test')
| -rw-r--r-- | android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/misc/SimpleMullvadHttpClient.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/misc/SimpleMullvadHttpClient.kt b/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/misc/SimpleMullvadHttpClient.kt index 3373691923..5e702a2d80 100644 --- a/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/misc/SimpleMullvadHttpClient.kt +++ b/android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/misc/SimpleMullvadHttpClient.kt @@ -187,7 +187,13 @@ class SimpleMullvadHttpClient(context: Context) { } operator fun <T> JSONArray.iterator(): Iterator<T> = - (0 until this.length()).asSequence().map { this.get(it) as T }.iterator() + (0 until length()) + .asSequence() + .map { + @Suppress("UNCHECKED_CAST") + get(it) as T + } + .iterator() companion object { private const val REQUEST_ERROR_MESSAGE = |
