From 21904054a574e534560d8d739e74feafd4aea517 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 12 May 2022 17:29:10 +0200 Subject: [PATCH] Detekt: ignore EmptyCatchBlock --- .../matrix/android/sdk/internal/crypto/RoomDecryptorProvider.kt | 2 +- .../internal/crypto/store/db/migration/MigrateCryptoTo007.kt | 2 +- .../app/features/notifications/NotifiableEventResolver.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/RoomDecryptorProvider.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/RoomDecryptorProvider.kt index dab806a565..c2f494b4b3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/RoomDecryptorProvider.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/RoomDecryptorProvider.kt @@ -79,7 +79,7 @@ internal class RoomDecryptorProvider @Inject constructor( newSessionListeners.toList().forEach { try { it.onNewSession(roomId, senderKey, sessionId) - } catch (e: Throwable) { + } catch (ignore: Throwable) { } } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo007.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo007.kt index 718b9787d2..0e221e78f3 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo007.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo007.kt @@ -42,7 +42,7 @@ internal class MigrateCryptoTo007(realm: DynamicRealm) : RealmMigrator(realm, 7) val jsonSignatures = crossSigningKeysMapper.serializeSignatures(objectSignatures) it.setString(KeyInfoEntityFields.SIGNATURES, jsonSignatures) } - } catch (failure: Throwable) { + } catch (ignore: Throwable) { } // Migrate frozen classes diff --git a/vector/src/main/java/im/vector/app/features/notifications/NotifiableEventResolver.kt b/vector/src/main/java/im/vector/app/features/notifications/NotifiableEventResolver.kt index 80f5f47b3b..b9d9261abe 100644 --- a/vector/src/main/java/im/vector/app/features/notifications/NotifiableEventResolver.kt +++ b/vector/src/main/java/im/vector/app/features/notifications/NotifiableEventResolver.kt @@ -215,7 +215,7 @@ class NotifiableEventResolver @Inject constructor( keysClaimed = result.claimedEd25519Key?.let { mapOf("ed25519" to it) }, forwardingCurve25519KeyChain = result.forwardingCurve25519KeyChain ) - } catch (e: MXCryptoError) { + } catch (ignore: MXCryptoError) { } } }