Use shorter getter annotation syntax
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 30 May 2016 16:33:44 +0000 (18:33 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 30 May 2016 16:33:44 +0000 (18:33 +0200)
src/main/kotlin/net/pterodactylus/rhynodge/webpages/weather/WeatherState.kt

index dff71d7..0d1d7f1 100644 (file)
@@ -20,9 +20,8 @@ class WeatherState(val service: String, val dateTime: ZonedDateTime) : AbstractS
     @JsonProperty("hours")
     val hours: List<HourState> = mutableListOf()
 
-    val timeMillis: Long
-        @JsonGetter("dateTime")
-        get() = dateTime.toInstant().toEpochMilli()
+    @get:JsonGetter("dateTime")
+    val timeMillis = dateTime.toInstant().toEpochMilli()
 
     operator fun plusAssign(hourState: HourState) {
         (hours as MutableList<HourState>).add(hourState)