mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Avoid Exception if array is empty.
This commit is contained in:
parent
73ce38c6a9
commit
f86fa6cb5d
1 changed files with 2 additions and 2 deletions
|
@ -239,12 +239,12 @@ internal object CertUtil {
|
|||
fun newConnectionSpecs(hsConfig: HomeServerConnectionConfig): List<ConnectionSpec> {
|
||||
val builder = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
|
||||
val tlsVersions = hsConfig.tlsVersions
|
||||
if (null != tlsVersions) {
|
||||
if (null != tlsVersions && tlsVersions.isNotEmpty()) {
|
||||
builder.tlsVersions(*tlsVersions.toTypedArray())
|
||||
}
|
||||
|
||||
val tlsCipherSuites = hsConfig.tlsCipherSuites
|
||||
if (null != tlsCipherSuites) {
|
||||
if (null != tlsCipherSuites && tlsCipherSuites.isNotEmpty()) {
|
||||
builder.cipherSuites(*tlsCipherSuites.toTypedArray())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue