Skip to content

Commit 24d3a15

Browse files
Updated equality check for accounts.
1 parent c15b578 commit 24d3a15

File tree

1 file changed

+2
-7
lines changed
  • onixlabs-corda-identity-framework-contract/src/main/kotlin/io/onixlabs/corda/identityframework/contract/accounts

1 file changed

+2
-7
lines changed

onixlabs-corda-identity-framework-contract/src/main/kotlin/io/onixlabs/corda/identityframework/contract/accounts/AccountParty.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,8 @@ class AccountParty internal constructor(
9090
* @return Returns true if the specified object is equal to the current object; otherwise, false.
9191
*/
9292
override fun equals(other: Any?): Boolean {
93-
return this === other || when (other) {
94-
is AccountParty -> other.party == party
95-
&& other.accountLinearId == accountLinearId
96-
&& other.accountType == accountType
97-
is AbstractParty -> other == party
98-
else -> false
99-
}
93+
return if (other !is AccountParty) super.equals(other)
94+
else other.party == party && other.accountLinearId == accountLinearId && other.accountType == accountType
10095
}
10196

10297
/**

0 commit comments

Comments
 (0)