Fix Java interop issues

This commit is contained in:
TacoTheDank 2020-06-08 16:22:25 -04:00
parent c30e8b4da8
commit 8fa48f2c19
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ fun Cursor.safeGetInt(columnIndex: Int, def: Int = -1) = try {
def
}
fun Cursor.safeGetString(columnIndex: Int, def: String = "") = try {
fun Cursor.safeGetString(columnIndex: Int, def: String = ""): String = try {
getString(columnIndex)
} catch (e: IllegalStateException) {
def

View File

@ -30,5 +30,5 @@ fun ContentTypeField.getIntParameter(name: String, def: Int): Int {
}
fun ContentTypeField.getBooleanParameter(name: String): Boolean {
return getParameter(name).toBoolean()
return this.getParameter(name)!!.toBoolean()
}

View File

@ -46,7 +46,7 @@ fun CardEntity.toParcelable(accountKey: UserKey, accountType: String): Parcelabl
fun ParcelableCardEntity.getAsBoolean(key: String, def: Boolean): Boolean {
val value = getValue(key) ?: return def
return value.value.toBoolean()
return value.value!!.toBoolean()
}
fun ParcelableCardEntity.getAsString(key: String, def: String?): String? {