From 9559fcae424502cfd11ef58fa6ab3406b930bcbe Mon Sep 17 00:00:00 2001 From: Mansi Pandya Date: Wed, 2 Oct 2024 12:22:35 -0400 Subject: [PATCH] Address review comments --- .../kotlin/com/mparticle/internal/BatchId.kt | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/android-core/src/main/kotlin/com/mparticle/internal/BatchId.kt b/android-core/src/main/kotlin/com/mparticle/internal/BatchId.kt index 242640be8..673fc26dc 100644 --- a/android-core/src/main/kotlin/com/mparticle/internal/BatchId.kt +++ b/android-core/src/main/kotlin/com/mparticle/internal/BatchId.kt @@ -3,14 +3,10 @@ package com.mparticle.internal import com.mparticle.internal.database.services.MessageService.ReadyMessage class BatchId { - var mpid: Long - get() = field + val mpid: Long var sessionId: String? - get() = field var dataplanId: String? - get() = field var dataplanVersion: Int? - get() = field constructor(mpid: Long, sessionId: String?, dataplanId: String?, dataplanVersion: Int?) { this.mpid = mpid @@ -25,24 +21,4 @@ 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 { - return arrayOf(mpid, sessionId, dataplanId, dataplanVersion) - } } \ No newline at end of file