MDT: fix crash caused by code changes
This commit is contained in:
parent
be647d8b5b
commit
ed6858bee7
1 changed files with 5 additions and 2 deletions
|
@ -50,8 +50,11 @@ class PumpSyncStorage @Inject constructor(
|
||||||
|
|
||||||
if (jsonData.isNotBlank()) {
|
if (jsonData.isNotBlank()) {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
pumpSyncStorageBolus = xstream.fromXML(jsonData, MutableList::class.java) as
|
pumpSyncStorageBolus = try {
|
||||||
MutableList<PumpDbEntryBolus>
|
xstream.fromXML(jsonData, MutableList::class.java) as MutableList<PumpDbEntryBolus>
|
||||||
|
} catch (e: Exception) {
|
||||||
|
mutableListOf()
|
||||||
|
}
|
||||||
|
|
||||||
aapsLogger.debug(LTag.PUMP, "Loading Pump Sync Storage Bolus: boluses=${pumpSyncStorageBolus.size}")
|
aapsLogger.debug(LTag.PUMP, "Loading Pump Sync Storage Bolus: boluses=${pumpSyncStorageBolus.size}")
|
||||||
aapsLogger.debug(LTag.PUMP, "DD: PumpSyncStorageBolus=$pumpSyncStorageBolus")
|
aapsLogger.debug(LTag.PUMP, "DD: PumpSyncStorageBolus=$pumpSyncStorageBolus")
|
||||||
|
|
Loading…
Reference in a new issue