aboutsummaryrefslogtreecommitdiff
path: root/ssh/src
diff options
context:
space:
mode:
authorrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>2023-09-18 18:15:11 +0000
committerGitHub <noreply@github.com>2023-09-18 18:15:11 +0000
commit932971017832fb6a514a262b8efc4200e1bff830 (patch)
tree0c915be3f67b6b85871a06d016d5876544816390 /ssh/src
parent0fe88455ae74dd5f0f13bddad8a10a7bcf19dd1d (diff)
fix(deps): update dependency com.facebook:ktfmt to v0.45 (#2687)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ssh/src')
-rw-r--r--ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt b/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt
index f30249c1..e90eedee 100644
--- a/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt
+++ b/ssh/src/main/kotlin/app/passwordstore/ssh/SSHKeyManager.kt
@@ -61,8 +61,7 @@ public class SSHKeyManager(private val applicationContext: Context) {
private fun keyType(): SSHKeyType {
return SSHKeyType.fromValue(
applicationContext.sharedPrefs.getString(Constants.GIT_REMOTE_KEY_TYPE, null)
- )
- ?: throw NullKeyException()
+ ) ?: throw NullKeyException()
}
public fun keyExists(): Boolean {
@@ -121,8 +120,7 @@ public class SSHKeyManager(private val applicationContext: Context) {
// Cursor returns only a single row.
cursor.moveToFirst()
cursor.getInt(0)
- }
- ?: throw IOException(applicationContext.getString(R.string.ssh_key_does_not_exist))
+ } ?: throw IOException(applicationContext.getString(R.string.ssh_key_does_not_exist))
// We assume that an SSH key's ideal size is > 0 bytes && < 100 kilobytes.
require(fileSize in 1 until SSH_KEY_MAX_FILE_SIZE) {
applicationContext.getString(R.string.ssh_key_import_error_not_an_ssh_key_message)