Skip to content

Commit

Permalink
Use Kotlin's Enum.entries instead of Enum.values().
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth J. Shackleton <[email protected]>
  • Loading branch information
kennethshackleton committed Feb 3, 2024
1 parent bd75805 commit e286e0d
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 e286e0d

Please sign in to comment.