File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/main/kotlin/spp/protocol/instrument Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -117,19 +117,17 @@ data class LiveBreakpoint(
117117 /* *
118118 * Specify explicitly so Kotlin doesn't override.
119119 */
120+ @Suppress(" RedundantOverride" )
120121 override fun equals (other : Any? ): Boolean = super .equals(other)
121122
122123 /* *
123124 * Specify explicitly so Kotlin doesn't override.
124125 */
126+ @Suppress(" RedundantOverride" )
125127 override fun hashCode (): Int = super .hashCode()
126128
127129 fun addHitListener (vertx : Vertx , listener : (LiveBreakpointHit ) -> Unit ) {
128- val instrumentId = id
129- if (instrumentId == null ) {
130- error(" Instrument must be applied before adding a hit listener" )
131- }
132-
130+ val instrumentId = id ? : error(" Instrument must be applied before adding a hit listener" )
133131 vertx.eventBus().consumer<JsonObject >(toLiveInstrumentSubscription(instrumentId)).handler {
134132 val event = LiveInstrumentEvent .fromJson(it.body())
135133 if (event.eventType == LiveInstrumentEventType .BREAKPOINT_HIT ) {
You can’t perform that action at this time.
0 commit comments