Skip to content

Commit 9c29b18

Browse files
committed
chore: deser optionals
1 parent 73b0a30 commit 9c29b18

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ data class LiveBreakpoint(
4848
location = LiveSourceLocation(json.getJsonObject("location")),
4949
condition = json.getString("condition"),
5050
expiresAt = json.getLong("expiresAt"),
51-
hitLimit = json.getInteger("hitLimit"),
51+
hitLimit = json.getInteger("hitLimit") ?: 1,
5252
id = json.getString("id"),
5353
applyImmediately = json.getBoolean("applyImmediately") ?: false,
5454
applied = json.getBoolean("applied") ?: false,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data class LiveLog(
5050
location = LiveSourceLocation(json.getJsonObject("location")),
5151
condition = json.getString("condition"),
5252
expiresAt = json.getLong("expiresAt"),
53-
hitLimit = json.getInteger("hitLimit"),
53+
hitLimit = json.getInteger("hitLimit") ?: 1,
5454
id = json.getString("id"),
5555
applyImmediately = json.getBoolean("applyImmediately") ?: false,
5656
applied = json.getBoolean("applied") ?: false,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ data class LiveMeter(
5454
LiveSourceLocation(json.getJsonObject("location")),
5555
json.getString("condition"),
5656
json.getLong("expiresAt"),
57-
json.getInteger("hitLimit"),
57+
json.getInteger("hitLimit") ?: -1,
5858
json.getString("id"),
5959
json.getBoolean("applyImmediately") ?: false,
6060
json.getBoolean("applied") ?: false,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ data class LiveSourceLocation @JvmOverloads constructor(
4040

4141
constructor(json: JsonObject) : this(
4242
source = json.getString("source"),
43-
line = json.getInteger("line"),
43+
line = json.getInteger("line") ?: -1,
4444
service = json.getString("service"),
4545
serviceInstance = json.getString("serviceInstance"),
4646
commitId = json.getString("commitId"),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ data class LiveSpan(
4646
location = LiveSourceLocation(json.getJsonObject("location")),
4747
condition = json.getString("condition"),
4848
expiresAt = json.getLong("expiresAt"),
49-
hitLimit = json.getInteger("hitLimit"),
49+
hitLimit = json.getInteger("hitLimit") ?: -1,
5050
id = json.getString("id"),
5151
applyImmediately = json.getBoolean("applyImmediately") ?: false,
5252
applied = json.getBoolean("applied") ?: false,

0 commit comments

Comments
 (0)