Skip to content

Commit

Permalink
Merge pull request #490 from kennethshackleton/enum-entries
Browse files Browse the repository at this point in the history
Use Kotlin's Enum.entries instead of Enum.values().
  • Loading branch information
kennethshackleton authored Feb 3, 2024
2 parents bd75805 + e286e0d commit d724daf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class SQLiteDatabase private constructor(
* not possible to enable or disable auto-vacuum after a table has been created.
*/
var autoVacuum: SQLiteAutoVacuumMode
get() = SQLiteAutoVacuumMode.values()[Integer.parseInt(database.pragma("auto_vacuum"))]
get() = SQLiteAutoVacuumMode.entries[Integer.parseInt(database.pragma("auto_vacuum"))]
set(value) { database.pragma("auto_vacuum", value) }

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private fun createFile(
internal class SampleSQLArgumentsProvider : ArgumentsProvider {
override fun provideArguments(
context: ExtensionContext
): Stream<out Arguments> = (SQLiteJournalMode.values().filter { it != SQLiteJournalMode.MEMORY } *
): Stream<out Arguments> = (SQLiteJournalMode.entries.filter { it != SQLiteJournalMode.MEMORY } *
arrayOf(ByteArray(32) { 0x42 }, null)).map {
SQLInputs(it.first, it.second)
}.map { Arguments.of(it) }.stream()
Expand Down

0 comments on commit d724daf

Please sign in to comment.