Fixed unnecessary non-null assertions

This commit is contained in:
Robinson 2023-07-11 00:23:08 +02:00
parent 990652288e
commit c4ddfe8675
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ open class Client<CONNECTION : Connection>(
private var connection0: CONNECTION? = null private var connection0: CONNECTION? = null
private val string0: String by lazy { private val string0: String by lazy {
"EndPoint [Client: $${storage.publicKey!!.toHexString()}]" "EndPoint [Client: $${storage.publicKey.toHexString()}]"
} }
final override fun newException(message: String, cause: Throwable?): Throwable { final override fun newException(message: String, cause: Throwable?): Throwable {

View File

@ -117,7 +117,7 @@ internal class CryptoManagement(val logger: KLogger,
this.publicKey = keyFactory.generatePublic(XECPublicKeySpec(X25519KeySpec, BigInteger(publicKeyBytes))) as XECPublicKey this.publicKey = keyFactory.generatePublic(XECPublicKeySpec(X25519KeySpec, BigInteger(publicKeyBytes))) as XECPublicKey
this.privateKey = keyFactory.generatePrivate(XECPrivateKeySpec(X25519KeySpec, privateKeyBytes)) as XECPrivateKey this.privateKey = keyFactory.generatePrivate(XECPrivateKeySpec(X25519KeySpec, privateKeyBytes)) as XECPrivateKey
this.privateKeyBytes = privateKeyBytes!! this.privateKeyBytes = privateKeyBytes
this.publicKeyBytes = publicKeyBytes this.publicKeyBytes = publicKeyBytes
} }