From 055d37db5f0b2733ddf0b463a740d517e7eab290 Mon Sep 17 00:00:00 2001 From: 0x330a <92654767+0x330a@users.noreply.github.com> Date: Wed, 22 Feb 2023 17:22:29 +1100 Subject: [PATCH] refactor: add more else branches for unimplemented types --- .../org/thoughtcrime/securesms/dependencies/ConfigFactory.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt b/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt index e951eac9e4..6d4bfd57d6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/dependencies/ConfigFactory.kt @@ -117,6 +117,7 @@ class ConfigFactory(private val context: Context, is UserProfile -> persistUserConfigDump() is Contacts -> persistContactsConfigDump() is ConversationVolatileConfig -> persistConvoVolatileConfigDump() + else -> throw UnsupportedOperationException("Can't support type of ${forConfigObject::class.simpleName} yet") } } @@ -125,6 +126,7 @@ class ConfigFactory(private val context: Context, is UserProfile -> userHashes.add(hash) is Contacts -> contactsHashes.add(hash) is ConversationVolatileConfig -> convoHashes.add(hash) + else -> throw UnsupportedOperationException("Can't support type of ${configObject::class.simpleName} yet") } }