Skip to content

Commit e7534e1

Browse files
committed
chore: support serializing old format
1 parent 603dd71 commit e7534e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ data class LiveSourceLocation @JvmOverloads constructor(
4242
constructor(json: JsonObject) : this(
4343
source = json.getString("source"),
4444
line = json.getInteger("line") ?: -1,
45-
service = json.getJsonObject("service")?.let { Service(it) },
45+
service = json.getValue("service")?.let {
46+
if (it is JsonObject) {
47+
Service(it)
48+
} else {
49+
//todo: remove v0.8.0+
50+
Service.fromName(it.toString())
51+
}
52+
},
4653
serviceInstance = json.getString("serviceInstance"),
4754
commitId = json.getString("commitId"),
4855
fileChecksum = json.getString("fileChecksum"),

0 commit comments

Comments
 (0)