Skip to content

Commit e125b90

Browse files
committed
fix: equals in live instruments
1 parent a18cec7 commit e125b90

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

src/main/kotlin/spp/protocol/instrument/LiveBreakpoint.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ data class LiveBreakpoint(
7373
/**
7474
* Specify explicitly so Kotlin doesn't override.
7575
*/
76-
override fun hashCode(): Int {
77-
return super.hashCode()
78-
}
76+
override fun equals(other: Any?): Boolean = super.equals(other)
77+
78+
/**
79+
* Specify explicitly so Kotlin doesn't override.
80+
*/
81+
override fun hashCode(): Int = super.hashCode()
7982
}

src/main/kotlin/spp/protocol/instrument/LiveLog.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ data class LiveLog(
8080
/**
8181
* Specify explicitly so Kotlin doesn't override.
8282
*/
83-
override fun hashCode(): Int {
84-
return super.hashCode()
85-
}
83+
override fun equals(other: Any?): Boolean = super.equals(other)
84+
85+
/**
86+
* Specify explicitly so Kotlin doesn't override.
87+
*/
88+
override fun hashCode(): Int = super.hashCode()
8689
}

src/main/kotlin/spp/protocol/instrument/LiveMeter.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ data class LiveMeter(
8585

8686
fun toMetricId(): String = "spp_" + toMetricIdWithoutPrefix()
8787

88+
/**
89+
* Specify explicitly so Kotlin doesn't override.
90+
*/
91+
override fun equals(other: Any?): Boolean = super.equals(other)
92+
8893
/**
8994
* Specify explicitly so Kotlin doesn't override.
9095
*/

src/main/kotlin/spp/protocol/instrument/LiveSpan.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ data class LiveSpan(
7272
return json
7373
}
7474

75+
/**
76+
* Specify explicitly so Kotlin doesn't override.
77+
*/
78+
override fun equals(other: Any?): Boolean = super.equals(other)
79+
7580
/**
7681
* Specify explicitly so Kotlin doesn't override.
7782
*/

0 commit comments

Comments
 (0)