diff --git a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt index 28da5ca0..d03d67d8 100644 --- a/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt +++ b/persistence/LuceneBankingPersistence/src/main/kotlin/net/dankito/banking/persistence/LuceneBankingPersistence.kt @@ -16,10 +16,10 @@ import net.dankito.banking.LuceneConfig.Companion.UsageFieldName import net.dankito.banking.ui.model.Customer import net.dankito.banking.ui.model.AccountTransaction import net.dankito.banking.ui.model.BankAccount +import net.dankito.banking.util.ISerializer +import net.dankito.banking.util.JacksonJsonSerializer import net.dankito.utils.lucene.index.DocumentsWriter import net.dankito.utils.lucene.index.FieldBuilder -import net.dankito.utils.serialization.ISerializer -import net.dankito.utils.serialization.JacksonJsonSerializer import org.apache.lucene.index.IndexableField import org.slf4j.LoggerFactory import java.io.File diff --git a/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt b/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt index 5ce5187c..31265b83 100644 --- a/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt +++ b/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt @@ -3,8 +3,8 @@ package net.dankito.banking.persistence import net.dankito.banking.ui.model.Customer import net.dankito.banking.ui.model.AccountTransaction import net.dankito.banking.ui.model.BankAccount -import net.dankito.utils.serialization.ISerializer -import net.dankito.utils.serialization.JacksonJsonSerializer +import net.dankito.banking.util.ISerializer +import net.dankito.banking.util.JacksonJsonSerializer import java.io.File diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/di/BankingModule.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/di/BankingModule.kt index c83799d7..1852edde 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/di/BankingModule.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/di/BankingModule.kt @@ -27,8 +27,6 @@ import net.dankito.text.extraction.pdf.PdfBoxAndroidPdfTextExtractor import net.dankito.text.extraction.pdf.iText2PdfTextExtractor import net.dankito.utils.IThreadPool import net.dankito.utils.ThreadPool -import net.dankito.utils.serialization.ISerializer -import net.dankito.utils.serialization.JacksonJsonSerializer import net.dankito.utils.web.client.IWebClient import net.dankito.utils.web.client.OkHttpWebClient import java.io.File diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/ISerializer.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/ISerializer.kt index 197b187f..423982df 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/ISerializer.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/ISerializer.kt @@ -9,4 +9,7 @@ interface ISerializer { fun deserializeObject(serializedObjectFile: File, objectClass: Class, vararg genericParameterTypes: Class<*>): T? + fun deserializeListOr(serializedObjectFile: File, genericListParameterType: Class, + defaultValue: List = listOf()) : List + } \ No newline at end of file diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/JacksonJsonSerializer.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/JacksonJsonSerializer.kt index 0b9a01ef..fa7aa96b 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/JacksonJsonSerializer.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/JacksonJsonSerializer.kt @@ -17,4 +17,8 @@ open class JacksonJsonSerializer( return serializer.deserializeObject(serializedObjectFile, objectClass, *genericParameterTypes) } + override fun deserializeListOr(serializedObjectFile: File, genericListParameterType: Class, defaultValue: List): List { + return serializer.deserializeListOr(serializedObjectFile, genericListParameterType, defaultValue) + } + } \ No newline at end of file diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/NoOpSerializer.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/NoOpSerializer.kt index e0ecd084..47af3fcf 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/NoOpSerializer.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/NoOpSerializer.kt @@ -13,4 +13,8 @@ open class NoOpSerializer : ISerializer { return null } + override fun deserializeListOr(serializedObjectFile: File, genericListParameterType: Class, defaultValue: List): List { + return defaultValue + } + } \ No newline at end of file