From 8dc2174081a6ad7f5a9ee6b1aa407cf082930cf6 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 9 Oct 2024 19:08:43 +0200 Subject: [PATCH] Added mediumName to hashCode() and equals() --- .../datenelemente/implementierte/tan/MobilePhoneTanMedium.kt | 2 -- .../datenelemente/implementierte/tan/TanGeneratorTanMedium.kt | 2 -- .../messages/datenelemente/implementierte/tan/TanMedium.kt | 2 ++ 3 files changed, 2 insertions(+), 4 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 9b68a7df..2ab47d62 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 @@ -18,7 +18,6 @@ open class MobilePhoneTanMedium( if (other !is MobilePhoneTanMedium) return false if (!super.equals(other)) return false - if (mediumName != other.mediumName) return false if (concealedPhoneNumber != other.concealedPhoneNumber) return false if (phoneNumber != other.phoneNumber) return false if (smsDebitAccount != other.smsDebitAccount) return false @@ -28,7 +27,6 @@ open class MobilePhoneTanMedium( override fun hashCode(): Int { var result = super.hashCode() - result = 31 * result + (mediumName.hashCode()) result = 31 * result + (concealedPhoneNumber?.hashCode() ?: 0) result = 31 * result + (phoneNumber?.hashCode() ?: 0) result = 31 * result + (smsDebitAccount?.hashCode() ?: 0) 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 5c5abd31..c94d701f 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 @@ -27,7 +27,6 @@ open class TanGeneratorTanMedium( if (cardType != other.cardType) return false if (validFrom != other.validFrom) return false if (validTo != other.validTo) return false - if (mediumName != other.mediumName) return false return true } @@ -39,7 +38,6 @@ open class TanGeneratorTanMedium( result = 31 * result + (cardType?.hashCode() ?: 0) result = 31 * result + (validFrom?.hashCode() ?: 0) result = 31 * result + (validTo?.hashCode() ?: 0) - result = 31 * result + (mediumName?.hashCode() ?: 0) return result } diff --git a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanMedium.kt b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanMedium.kt index 63806f5a..29aa9da2 100644 --- a/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanMedium.kt +++ b/fints4k/src/commonMain/kotlin/net/codinux/banking/fints/messages/datenelemente/implementierte/tan/TanMedium.kt @@ -29,6 +29,7 @@ open class TanMedium( if (mediumClass != other.mediumClass) return false if (status != other.status) return false + if (mediumName != other.mediumName) return false return true } @@ -36,6 +37,7 @@ open class TanMedium( override fun hashCode(): Int { var result = mediumClass.hashCode() result = 31 * result + status.hashCode() + result = 31 * result + mediumName.hashCode() return result }