From e8cb8ab2e3cfd12174b70250e2fc23812cf532ac Mon Sep 17 00:00:00 2001 From: "Kenneth J. Shackleton" Date: Sun, 16 Jul 2023 11:43:48 +0100 Subject: [PATCH 1/2] Kotlin 1.9.0. Signed-off-by: Kenneth J. Shackleton --- buildSrc/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 918510aa52..11078b6fbc 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -15,7 +15,7 @@ */ // TODO Move me. -val kotlinVersion = "1.8.22" +val kotlinVersion = "1.9.0" plugins { `kotlin-dsl` From 650843ceaa584c211b044b6d955e203077c7c3c1 Mon Sep 17 00:00:00 2001 From: "Kenneth J. Shackleton" Date: Sun, 16 Jul 2023 12:04:15 +0100 Subject: [PATCH 2/2] Try replacing forEach. Signed-off-by: Kenneth J. Shackleton --- .../selekt/android/support/SupportSQLiteDatabase.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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