TP-76356 | Mehul | gson null handled (#12614)
This commit is contained in:
@@ -14,7 +14,7 @@ import com.navi.bbps.feature.customerinput.model.view.BillerAdditionalParamsEnti
|
||||
fun String.toBillerAdditionalParamsEntityList(): List<BillerAdditionalParamsEntity> {
|
||||
return try {
|
||||
val type = object : TypeToken<List<BillerAdditionalParamsEntity>>() {}.type
|
||||
Gson().fromJson(this, type)
|
||||
Gson().fromJson(this, type) ?: emptyList()
|
||||
} catch (e: Exception) {
|
||||
emptyList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user