We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e897ca commit 8533a5dCopy full SHA for 8533a5d
lib/src/test/java/at/bitfire/cert4android/CustomCertManagerTest.kt
@@ -82,11 +82,8 @@ class CustomCertManagerTest {
82
try {
83
conn.connectTimeout = 5000
84
conn.readTimeout = 5000
85
- conn.inputStream.use { stream ->
86
- stream.read()
87
- val certs = mutableListOf<X509Certificate>()
88
- conn.serverCertificates.forEach { certs += it as X509Certificate }
89
- return certs
+ conn.inputStream.use {
+ return conn.serverCertificates.filterIsInstance<X509Certificate>()
90
}
91
} finally {
92
conn.disconnect()
0 commit comments