From 93e268c0d0864f849dd933f836457d211aec2ab7 Mon Sep 17 00:00:00 2001 From: dankl Date: Sat, 12 Oct 2019 13:50:33 +0200 Subject: [PATCH] Fixed that other party name can be null --- .../net/dankito/fints/transactions/mt940/Mt940Parser.kt | 4 +++- .../fints/transactions/mt940/model/TransactionDetails.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt index 0adcae1c..17392365 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt @@ -305,8 +305,10 @@ open class Mt940Parser : IMt940Parser { } } + val otherPartyNameString = if (otherPartyName.isEmpty()) null else otherPartyName.toString() + val details = TransactionDetails( - usage.toString(), otherPartyName.toString(), otherPartyBankCode, otherPartyAccountId, + usage.toString(), otherPartyNameString, otherPartyBankCode, otherPartyAccountId, bookingText, primaNotaNumber, textKeySupplement ) return details diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/model/TransactionDetails.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/model/TransactionDetails.kt index ab23376d..16040350 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/model/TransactionDetails.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/model/TransactionDetails.kt @@ -3,7 +3,7 @@ package net.dankito.fints.transactions.mt940.model open class TransactionDetails( val usage: String, - val otherPartyName: String, + val otherPartyName: String?, val otherPartyBankCode: String?, val otherPartyAccountId: String?, val bookingText: String?,