From 8346fb507761cddedf39bd584db0a53fa3dcacb7 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 9 Oct 2024 19:12:24 +0200 Subject: [PATCH] Using now nullable hashCode() method --- .../implementierte/tan/MobilePhoneTanMedium.kt | 6 +++--- .../implementierte/tan/TanGeneratorTanMedium.kt | 6 +++--- .../net/codinux/banking/fints/model/AccountTransaction.kt | 8 ++++---- .../dankito/banking/client/model/AccountTransaction.kt | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/MobilePhoneTanMedium.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/MobilePhoneTanMedium.kt index 2ab47d62..c4d93773 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/MobilePhoneTanMedium.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/MobilePhoneTanMedium.kt @@ -27,9 +27,9 @@ open class MobilePhoneTanMedium( override fun hashCode(): Int { var result = super.hashCode() - result = 31 * result + (concealedPhoneNumber?.hashCode() ?: 0) - result = 31 * result + (phoneNumber?.hashCode() ?: 0) - result = 31 * result + (smsDebitAccount?.hashCode() ?: 0) + result = 31 * result + concealedPhoneNumber.hashCode() + result = 31 * result + phoneNumber.hashCode() + result = 31 * result + smsDebitAccount.hashCode() return result } diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanGeneratorTanMedium.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanGeneratorTanMedium.kt index c94d701f..2d4f5f3a 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanGeneratorTanMedium.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanGeneratorTanMedium.kt @@ -35,9 +35,9 @@ open class TanGeneratorTanMedium( var result = super.hashCode() result = 31 * result + cardNumber.hashCode() result = 31 * result + cardSequenceNumber.hashCode() - result = 31 * result + (cardType?.hashCode() ?: 0) - result = 31 * result + (validFrom?.hashCode() ?: 0) - result = 31 * result + (validTo?.hashCode() ?: 0) + result = 31 * result + cardType.hashCode() + result = 31 * result + validFrom.hashCode() + result = 31 * result + validTo.hashCode() return result } diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/AccountTransaction.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/AccountTransaction.kt index 2bfd7f4f..eb20fcaf 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/AccountTransaction.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/model/AccountTransaction.kt @@ -148,10 +148,10 @@ open class AccountTransaction( result = 31 * result + amount.hashCode() result = 31 * result + reference.hashCode() result = 31 * result + bookingDate.hashCode() - result = 31 * result + (otherPartyName?.hashCode() ?: 0) - result = 31 * result + (otherPartyBankId?.hashCode() ?: 0) - result = 31 * result + (otherPartyAccountId?.hashCode() ?: 0) - result = 31 * result + (postingText?.hashCode() ?: 0) + result = 31 * result + otherPartyName.hashCode() + result = 31 * result + otherPartyBankId.hashCode() + result = 31 * result + otherPartyAccountId.hashCode() + result = 31 * result + postingText.hashCode() result = 31 * result + valueDate.hashCode() return result } diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt index 712a06b0..c1370de8 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/client/model/AccountTransaction.kt @@ -85,10 +85,10 @@ open class AccountTransaction( var result = amount.hashCode() result = 31 * result + reference.hashCode() result = 31 * result + bookingDate.hashCode() - result = 31 * result + (otherPartyName?.hashCode() ?: 0) - result = 31 * result + (otherPartyBankId?.hashCode() ?: 0) - result = 31 * result + (otherPartyAccountId?.hashCode() ?: 0) - result = 31 * result + (postingText?.hashCode() ?: 0) + result = 31 * result + otherPartyName.hashCode() + result = 31 * result + otherPartyBankId.hashCode() + result = 31 * result + otherPartyAccountId.hashCode() + result = 31 * result + postingText.hashCode() result = 31 * result + valueDate.hashCode() return result }