From da944508b45691cb40b360480cad623b201ced8e Mon Sep 17 00:00:00 2001 From: Francisco Saldanha Date: Fri, 6 May 2016 23:44:11 -0300 Subject: [PATCH] Fix DateTypeAdapter --- .../java/net/frozenorb/apiv3/serialization/DateTypeAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/serialization/DateTypeAdapter.java b/src/main/java/net/frozenorb/apiv3/serialization/DateTypeAdapter.java index a1f3ba7..77d7645 100644 --- a/src/main/java/net/frozenorb/apiv3/serialization/DateTypeAdapter.java +++ b/src/main/java/net/frozenorb/apiv3/serialization/DateTypeAdapter.java @@ -10,7 +10,7 @@ import java.util.Date; public final class DateTypeAdapter extends TypeAdapter { public void write(JsonWriter writer, Date write) throws IOException { - writer.value(write.getTime()); + writer.value(write == null ? -1 : write.getTime()); } // This is used with Gson, which is only used