diff --git a/selekt-android/src/main/kotlin/com/bloomberg/selekt/android/support/SupportSQLiteDatabase.kt b/selekt-android/src/main/kotlin/com/bloomberg/selekt/android/support/SupportSQLiteDatabase.kt index 730467f80c..74725b8c20 100644 --- a/selekt-android/src/main/kotlin/com/bloomberg/selekt/android/support/SupportSQLiteDatabase.kt +++ b/selekt-android/src/main/kotlin/com/bloomberg/selekt/android/support/SupportSQLiteDatabase.kt @@ -132,14 +132,9 @@ private class SupportSQLiteDatabase constructor( override fun inTransaction() = database.isTransactionOpenedByCurrentThread override val isDatabaseIntegrityOk: Boolean - get() { - attachedDbs.forEach { - if (!database.integrityCheck(it.first)) { - return false - } + get() = !attachedDbs.any { + !database.integrityCheck(it.first) } - return true - } override val isDbLockedByCurrentThread: Boolean get() = database.isConnectionHeldByCurrentThread