Skip to content

Commit ef1d876

Browse files
committed
Add empty json checking
1 parent 0d2c4a1 commit ef1d876

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

File renamed without changes.

utbot-python/src/main/kotlin/org/utbot/python/typing/StubFileFinder.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ object StubFileFinder {
1616
private val jsonAdapter = moshi.adapter(StubFileStructures.JsonData::class.java)
1717

1818
private fun parseJson(json: String): StubFileStructures.JsonData? {
19-
return jsonAdapter.fromJson(json)
19+
return if (json.isNotEmpty()) {
20+
jsonAdapter.fromJson(json)
21+
} else {
22+
null
23+
}
2024
}
2125

2226
fun updateStubs(

0 commit comments

Comments
 (0)