mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-27 06:29:54 +00:00
Fix infinite export loop and improve general error handling.
This commit is contained in:
@@ -229,6 +229,7 @@ class UpdateBuilderPart3(
|
||||
private val where: String,
|
||||
private val whereArgs: Array<String>
|
||||
) {
|
||||
@JvmOverloads
|
||||
fun run(conflictStrategy: Int = SQLiteDatabase.CONFLICT_NONE): Int {
|
||||
return db.update(tableName, conflictStrategy, values, where, whereArgs)
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ interface Serializer<T, R> {
|
||||
|
||||
interface StringSerializer<T> : Serializer<T, String>
|
||||
|
||||
interface IntSerializer<T> : Serializer<T, Int>
|
||||
|
||||
interface LongSerializer<T> : Serializer<T, Long>
|
||||
|
||||
interface ByteSerializer<T> : Serializer<T, ByteArray>
|
||||
|
||||
@@ -63,7 +63,7 @@ object SqlUtil {
|
||||
return objects.map {
|
||||
when (it) {
|
||||
null -> throw NullPointerException("Cannot have null arg!")
|
||||
is DatabaseId -> (it as DatabaseId?)!!.serialize()
|
||||
is DatabaseId -> it.serialize()
|
||||
else -> it.toString()
|
||||
}
|
||||
}.toTypedArray()
|
||||
|
||||
Reference in New Issue
Block a user