Skip to content

Commit c81aa8b

Browse files
committed
javatime.kt: minor cleanup
1 parent 07dbf6f commit c81aa8b

File tree

1 file changed

+4
-3
lines changed
  • firebase-dataconnect/testutil/src/main/kotlin/com/google/firebase/dataconnect/testutil/property/arbitrary

1 file changed

+4
-3
lines changed

firebase-dataconnect/testutil/src/main/kotlin/com/google/firebase/dataconnect/testutil/property/arbitrary/javatime.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,13 @@ sealed interface TimeOffset {
221221
}
222222

223223
companion object {
224+
private const val SECONDS_PER_MINUTE: Int = 60
225+
private const val SECONDS_PER_HOUR: Int = 60 * SECONDS_PER_MINUTE
226+
224227
val validHours = 0..18
225228
val validMinutes = 0..59
226-
val maxSeconds: Int = 18 * 60 * 60
227229

228-
private const val SECONDS_PER_MINUTE = 60
229-
private const val SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE
230+
@Suppress("MayBeConstant") val maxSeconds: Int = 18 * SECONDS_PER_HOUR
230231

231232
fun forSeconds(seconds: Int, sign: Sign): HhMm {
232233
require(seconds in 0..maxSeconds) {

0 commit comments

Comments
 (0)