diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java index 6587fb6371..3b3b275506 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java +++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelperProvider.java @@ -1,10 +1,10 @@ package info.nightscout.androidaps.db; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.j256.ormlite.dao.CloseableIterator; -import org.jetbrains.annotations.Nullable; import org.json.JSONObject; import java.sql.SQLException; @@ -78,7 +78,7 @@ public class DatabaseHelperProvider implements DatabaseHelperInterface { return MainApp.Companion.getDbHelper().createOrUpdate(tempBasal); } - @NonNull @Override public TemporaryBasal findTempBasalByPumpId(long id) { + @Nullable @Override public TemporaryBasal findTempBasalByPumpId(long id) { return MainApp.Companion.getDbHelper().findTempBasalByPumpId(id); } diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt index 5864bd3754..0b2415260e 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt @@ -30,7 +30,7 @@ interface DatabaseHelperInterface { fun roundDateToSec(date: Long): Long fun createOrUpdateTDD(record: TDD) fun createOrUpdate(tempBasal: TemporaryBasal): Boolean - fun findTempBasalByPumpId(id: Long): TemporaryBasal + fun findTempBasalByPumpId(id: Long): TemporaryBasal? fun getTemporaryBasalsDataFromTime(mills: Long, ascending: Boolean): List fun getExtendedBolusDataFromTime(mills: Long, ascending: Boolean): List fun getProfileSwitchEventsFromTime(from: Long, to: Long, ascending: Boolean): List