Skip to content

Commit

Permalink
Revert code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle committed Oct 2, 2024
1 parent 9559fca commit 9e1b709
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions android-core/src/main/kotlin/com/mparticle/internal/BatchId.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,24 @@ class BatchId {
dataplanId = readyMessage.dataplanId
dataplanVersion = readyMessage.dataplanVersion
}

override fun equals(obj: Any?): Boolean {
if (obj !is BatchId) {
return false
}
for (i in 0 until fields().size) {
if (!MPUtility.isEqual(fields()[i], obj.fields()[i])) {
return false
}
}
return true
}

override fun hashCode(): Int {
return fields().contentHashCode()
}

private fun fields(): Array<Any?> {
return arrayOf(mpid, sessionId, dataplanId, dataplanVersion)
}
}

0 comments on commit 9e1b709

Please sign in to comment.