From dd441e9b27a4b1f4067735c5dc164a6c318e500a Mon Sep 17 00:00:00 2001 From: Christophe Beyls Date: Sun, 17 Nov 2024 16:20:25 +0100 Subject: [PATCH] refactor: remove now unnecessary @JvmStatic annotation for object TypeConverters --- .../be/digitalia/fosdem/db/converters/GlobalTypeConverters.kt | 4 ---- .../fosdem/db/converters/NonNullInstantTypeConverters.kt | 2 -- .../fosdem/db/converters/NonNullLocalDateTypeConverters.kt | 2 -- .../fosdem/db/converters/NullableInstantTypeConverters.kt | 2 -- .../fosdem/db/converters/NullableZoneOffsetTypeConverters.kt | 2 -- 5 files changed, 12 deletions(-) diff --git a/app/src/main/java/be/digitalia/fosdem/db/converters/GlobalTypeConverters.kt b/app/src/main/java/be/digitalia/fosdem/db/converters/GlobalTypeConverters.kt index 7d5e03e8..e041729d 100644 --- a/app/src/main/java/be/digitalia/fosdem/db/converters/GlobalTypeConverters.kt +++ b/app/src/main/java/be/digitalia/fosdem/db/converters/GlobalTypeConverters.kt @@ -7,19 +7,15 @@ import be.digitalia.fosdem.model.Person import be.digitalia.fosdem.model.Track object GlobalTypeConverters { - @JvmStatic @TypeConverter fun fromDay(day: Day): Long = day.index.toLong() - @JvmStatic @TypeConverter fun fromTrack(track: Track): Long = track.id - @JvmStatic @TypeConverter fun fromPerson(person: Person): Long = person.id - @JvmStatic @TypeConverter fun fromEvent(event: Event): Long = event.id } \ No newline at end of file diff --git a/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullInstantTypeConverters.kt b/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullInstantTypeConverters.kt index c53204a0..3725296d 100644 --- a/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullInstantTypeConverters.kt +++ b/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullInstantTypeConverters.kt @@ -4,11 +4,9 @@ import androidx.room.TypeConverter import java.time.Instant object NonNullInstantTypeConverters { - @JvmStatic @TypeConverter fun toInstant(value: Long): Instant = Instant.ofEpochSecond(value) - @JvmStatic @TypeConverter fun fromInstant(value: Instant): Long = value.epochSecond } \ No newline at end of file diff --git a/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullLocalDateTypeConverters.kt b/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullLocalDateTypeConverters.kt index ac108cdd..3a01dc93 100644 --- a/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullLocalDateTypeConverters.kt +++ b/app/src/main/java/be/digitalia/fosdem/db/converters/NonNullLocalDateTypeConverters.kt @@ -4,11 +4,9 @@ import androidx.room.TypeConverter import java.time.LocalDate object NonNullLocalDateTypeConverters { - @JvmStatic @TypeConverter fun toLocalDate(value: Long): LocalDate = LocalDate.ofEpochDay(value) - @JvmStatic @TypeConverter fun fromLocalDate(value: LocalDate): Long = value.toEpochDay() } \ No newline at end of file diff --git a/app/src/main/java/be/digitalia/fosdem/db/converters/NullableInstantTypeConverters.kt b/app/src/main/java/be/digitalia/fosdem/db/converters/NullableInstantTypeConverters.kt index b93005e0..99d02baf 100644 --- a/app/src/main/java/be/digitalia/fosdem/db/converters/NullableInstantTypeConverters.kt +++ b/app/src/main/java/be/digitalia/fosdem/db/converters/NullableInstantTypeConverters.kt @@ -4,11 +4,9 @@ import androidx.room.TypeConverter import java.time.Instant object NullableInstantTypeConverters { - @JvmStatic @TypeConverter fun toInstant(value: Long?): Instant? = value?.let { Instant.ofEpochSecond(it) } - @JvmStatic @TypeConverter fun fromInstant(value: Instant?): Long? = value?.epochSecond } \ No newline at end of file diff --git a/app/src/main/java/be/digitalia/fosdem/db/converters/NullableZoneOffsetTypeConverters.kt b/app/src/main/java/be/digitalia/fosdem/db/converters/NullableZoneOffsetTypeConverters.kt index 23c233f5..b75e237a 100644 --- a/app/src/main/java/be/digitalia/fosdem/db/converters/NullableZoneOffsetTypeConverters.kt +++ b/app/src/main/java/be/digitalia/fosdem/db/converters/NullableZoneOffsetTypeConverters.kt @@ -4,11 +4,9 @@ import androidx.room.TypeConverter import java.time.ZoneOffset object NullableZoneOffsetTypeConverters { - @JvmStatic @TypeConverter fun toZoneOffset(value: Int?): ZoneOffset? = value?.let { ZoneOffset.ofTotalSeconds(it) } - @JvmStatic @TypeConverter fun fromZoneOffset(value: ZoneOffset?): Int? = value?.totalSeconds } \ No newline at end of file