Avoid Exception if array is empty.
This commit is contained in:
parent
73ce38c6a9
commit
f86fa6cb5d
@ -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…
x
Reference in New Issue
Block a user