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>
This commit is contained in:
renovate[bot] 2023-09-18 18:15:11 +00:00 committed by GitHub
parent 0fe88455ae
commit 9329710178
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 20 deletions

View file

@ -197,8 +197,7 @@ object SshKey {
// Cursor returns only a single row.
cursor.moveToFirst()
cursor.getInt(0)
}
?: throw IOException(context.getString(R.string.ssh_key_does_not_exist))
} ?: throw IOException(context.getString(R.string.ssh_key_does_not_exist))
// We assume that an SSH key's ideal size is > 0 bytes && < 100 kilobytes.
if (fileSize > 100_000 || fileSize == 0)

View file

@ -165,6 +165,5 @@ fun Context.getCustomSuffixes(): Sequence<String> {
return sharedPrefs
.getString(PreferenceKeys.OREO_AUTOFILL_CUSTOM_PUBLIC_SUFFIXES)
?.splitToSequence('\n')
?.filter { it.isNotBlank() && it.first() != '.' && it.last() != '.' }
?: emptySequence()
?.filter { it.isNotBlank() && it.first() != '.' && it.last() != '.' } ?: emptySequence()
}

View file

@ -70,24 +70,21 @@ public sealed class AutofillScenario<out T : Any> {
clientState,
BUNDLE_KEY_CURRENT_PASSWORD_IDS,
AutofillId::class.java
)
?: emptyList()
) ?: emptyList()
)
newPassword.addAll(
BundleCompat.getParcelableArrayList(
clientState,
BUNDLE_KEY_NEW_PASSWORD_IDS,
AutofillId::class.java
)
?: emptyList()
) ?: emptyList()
)
genericPassword.addAll(
BundleCompat.getParcelableArrayList(
clientState,
BUNDLE_KEY_GENERIC_PASSWORD_IDS,
AutofillId::class.java
)
?: emptyList()
) ?: emptyList()
)
}
.build()

View file

@ -430,8 +430,7 @@ internal class AutofillStrategy private constructor(private val rules: List<Auto
possibleOtpFields,
singleOriginMode = singleOriginMode,
isManualRequest = isManualRequest
)
?: continue
) ?: continue
}
return null
}

View file

@ -238,8 +238,7 @@ private fun getBrowserAutofillSupportLevel(
// browsers here.
supportLevel != BrowserAutofillSupportLevel.GeneralFillAndSave &&
Build.VERSION.SDK_INT < Build.VERSION_CODES.P
}
?: BrowserAutofillSupportLevel.None
} ?: BrowserAutofillSupportLevel.None
}
@RequiresApi(Build.VERSION_CODES.O)

View file

@ -3,7 +3,6 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
@file:Suppress("JUnitMalformedDeclaration") // The test runner takes care of it
package app.passwordstore.crypto
import app.passwordstore.crypto.CryptoConstants.KEY_PASSPHRASE

View file

@ -41,7 +41,7 @@ build-diffutils = "io.github.java-diff-utils:java-diff-utils:4.12"
build-download = "de.undercouch:gradle-download-task:5.5.0"
build-javapoet = "com.squareup:javapoet:1.13.0"
build-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
build-ktfmt = "com.facebook:ktfmt:0.44"
build-ktfmt = "com.facebook:ktfmt:0.45"
build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.25.3"
build-metalava = "me.tylerbwong.gradle.metalava:plugin:0.3.3"
build-moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }

View file

@ -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)