Fix Java interop issues
This commit is contained in:
parent
c30e8b4da8
commit
8fa48f2c19
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
}
|
|
@ -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? {
|
||||
|
|
Loading…
Reference in New Issue