Skip to content
Snippets Groups Projects
Commit 6898d240 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Replace javafx duration with java.time

parent 92e6bfc2
No related branches found
No related tags found
No related merge requests found
package de.tobias.playpad.server.json
import java.time.Duration
import com.google.gson.{JsonElement, JsonPrimitive}
import javafx.util.Duration
class DurationSerializerHandler extends SerializerHandler {
override def serialize(value: Any): JsonPrimitive = value match {
......@@ -10,7 +11,7 @@ class DurationSerializerHandler extends SerializerHandler {
}
override def deserialize(jsonElement: JsonElement): Duration = jsonElement match {
case jsonPrimitive: JsonPrimitive => new Duration(jsonPrimitive.getAsInt)
case jsonPrimitive: JsonPrimitive => Duration.ofMillis(jsonPrimitive.getAsInt)
case _ => Duration.ZERO
}
}
package de.tobias.playpad.server.project.settings
import java.time.Duration
import java.util.UUID
import de.tobias.playpad.server.json._
import javafx.util.Duration
class Fade {
......
package de.tobias.playpad.server.project.settings
import java.time.Duration
import java.util.UUID
import de.tobias.playpad.server.json._
import de.tobias.playpad.server.project.{Design, Pad}
import javafx.util.Duration
class PadSettings {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment