Skip to content

Commit 5022c9f

Browse files
committed
refactor: typed live instrument events
1 parent d389e71 commit 5022c9f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/spp/cli/commands/developer/instrument/SubscribeInstrument.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,21 @@ class SubscribeInstrument : CliktCommand(
9595
when (liveEvent.eventType) {
9696
LiveInstrumentEventType.LOG_HIT -> {
9797
val logHit = liveEvent as LiveLogHit
98-
if (logHit.logId !in instrumentIds) {
98+
if (logHit.instrument.id !in instrumentIds) {
9999
return@consumer
100100
}
101101
}
102102

103103
LiveInstrumentEventType.BREAKPOINT_HIT -> {
104104
val breakpointHit = liveEvent as LiveBreakpointHit
105-
if (breakpointHit.breakpointId !in instrumentIds) {
105+
if (breakpointHit.instrument.id !in instrumentIds) {
106106
return@consumer
107107
}
108108
}
109109

110110
LiveInstrumentEventType.BREAKPOINT_REMOVED, LiveInstrumentEventType.LOG_REMOVED -> {
111111
val logRemoved = liveEvent as LiveInstrumentRemoved
112-
if (logRemoved.liveInstrument.id !in instrumentIds) {
112+
if (logRemoved.instrument.id !in instrumentIds) {
113113
return@consumer
114114
}
115115
}

0 commit comments

Comments
 (0)